Hello I was wondering how can I make comparisons between the meta_key and meta_value columns found in the wp_postmeta table?
For Example:
Lets assume that I want to select all the post_id's WHERE _wpml_media_featured is equal to 1 and WHERE _stock_status is equal to instock.
I used this code:
SELECT * FROM `Ab64Zf55_postmeta` WHERE
(`meta_key` = "_wpml_media_featured" AND `meta_value` = 1 )
AND
(`meta_key` = "_stock_status" AND `meta_value` = "instock" )
But I got 0 results returned from this query!
QUESTION:
- What am I doing wrong or how can I modify my code to get what I need?
-Thanks in advance for your help!
