Supposing I have a MySQL table (meta_table) as follows with the following data:
meta_id,post_id,meta_key,meta_value
5,10,my_key1,value1
10,11,my_key2,value2
15,12,my_key3,value3
35,11,my_key4,value4
How can I get the post_id if meta_value is value2 and value4 (the answer should be 11). I have tried this:
SELECT post_id from meta_table where meta_value='value2' and meta_value='value4'
But it does not return 11 as the post_id. Any suggestions?