Answer the question
In order to leave comments, you need to log in
Why is there extra data in the query result?
Why as a result of the request
SELECT * FROM `wp_postmeta` WHERE `post_id`=73 AND `meta_key`='_regular_price' OR `meta_key`='_sale_price'
Answer the question
In order to leave comments, you need to log in
Потому что приоритет операции AND выше чем у операции OR. У вас идет выборка либо такие записи `post_id`=73 AND `meta_key`='_regular_price'
либо такие `meta_key`='_sale_price'.
Поставьте скобки и все будет как хотите вот так:
`post_id`=73 AND (`meta_key`='_regular_price' OR `meta_key`='_sale_price')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question