i am doing a table with multiple keyboards or tags,
like this:
id | keyboards
===+================================================
1 | picture,mountain,animals
2 | water,mountain
3 | sound, mountain
4 | water, picture, mountain, space, other
and i want to make a select.
SELECT id from table where (mountain,picture,space) in keyboards;
result must be:
1 row
id
4.
please help me.
You have poor database normalization. Best way to do is to create a table
Keyboardsthen reference
keyboards.idintagstable.Then you can do this query,
but to answer you question, you can simply do this
SQLFiddle Demo