Database query looking for meta in wp_posts table
-
I get a list of sql errors but they are all related to looking for meta_key and meta_value in the wp_posts table instead of the wp_postmeta table. I did just upgrade, but I think WP has been keeping the meta in a separate table before this version.
Am I correct? Are you aware of this? Any chance you might be planning on updating?
If not, it’s OK (I realize it’s a free plugin!), but if you are, I wouldn’t spend the same effort working on the code myself. . .
Thanks!WordPress database error: [Unknown column ‘meta_key’ in ‘where clause’]
SELECT DISTINCT wp_posts.* FROM wp_posts WHERE 1=1 AND (wp_posts.ID = ‘7049’) AND wp_posts.post_type = ‘page’ AND meta_key=’_rsvp_dates’ AND meta_value >= ‘2018-03-01’ AND meta_value < DATE_ADD(‘2018-03-01’,INTERVAL 180 DAY) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESCWordPress database error: [Unknown column ‘meta_key’ in ‘where clause’]
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘tp_event’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘closed’ OR wp_posts.post_status = ‘expired’ OR wp_posts.post_status = ‘tp-event-upcoming’ OR wp_posts.post_status = ‘tp-event-happenning’ OR wp_posts.post_status = ‘tp-event-expired’ OR wp_posts.post_status = ‘ea-cancelled’ OR wp_posts.post_status = ‘ea-pending’ OR wp_posts.post_status = ‘ea-processing’ OR wp_posts.post_status = ‘ea-completed’ OR wp_posts.post_status = ‘private’ OR wp_posts.post_status = ‘hidden’) AND meta_key=’_rsvp_dates’ AND meta_value >= ‘2018-03-01’ AND meta_value < DATE_ADD(‘2018-03-01’,INTERVAL 180 DAY) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 10
- The topic ‘Database query looking for meta in wp_posts table’ is closed to new replies.