How can I query on the postmeta table for two keys
I need to replicate this info with SQL so I can get this data for reporting. I have not been able to find a way to query to get the data I want because the wp_postmeta table uses the same fields to store multiple pieces of data
Compare with multiple custom field values (text based values)
I use ACF to add extra info into posts. How do I create a SQL query something like this?
Select ID, title, venue, start_date
ID and Title are from the wp_posts table.
meta_key = start_date
meta_value = 20130610
meta_key = venue
meta_value = House of blues
How can I query this data so I can report and get metrics by venue?
I also need show all posts where venue = house of blues or all posts where venue = house of blues from 20130601 to 20140630 as an example.
Any help would be greatly appreciated. Right now I have to keep exporting the data separately to excel and then sorting by ID and moving columns around. Very time consuming and not efficient. I need to show reports to customers.
- The topic ‘How can I query on the postmeta table for two keys’ is closed to new replies.