WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
-
I’m dev’ing with debug on and am getting this error when searching post (on the admin side).
BTW, why are you appending here anyway? Shouldn’t you be checking to see if the search is against tribe_events? $_GET[] can tell you that, yes?
WordPress database error: [Not unique table/alias: ‘wp_postmeta’]
SELECT DISTINCT wp_posts.*, IF (wp_posts.post_type = ‘tribe_events’, wp_postmeta.meta_value, wp_posts.post_date) AS post_date FROM wp_posts LEFT JOIN wp_postmeta ON wp_posts.ID = wp_postmeta.post_id LEFT JOIN wp_postmeta as wp_postmeta on wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = ‘_EventStartDate’ WHERE 1=1 AND wp_posts.post_name = ‘events’ AND wp_posts.post_parent = 0 AND wp_posts.post_type IN (‘post’, ‘page’, ‘attachment’, ‘product’, ‘tribe_venue’, ‘tribe_events’) AND ((wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘inherit’ OR wp_posts.post_status = ‘private’)) ORDER BY post_date DESC
- The topic ‘WordPress database error: [Not unique table/alias: ‘wp_postmeta’]’ is closed to new replies.