WordPress query posts with multiple post_meta data
It’s not a normal practice to use raw SQL in WP, unless you absolutely have to. You should be using normal WP APIs for this and optimizing after you encounter a performance issue. Among other things APIs will transparently cache data (such as post meta) within page load and between page loads with Object Cache … Read more