WordPress database error
-
Hi, we’ve only recently installed TEC and started working on it by adding a couple of test events but on the front-end (/events/ page) we get this sql error (debug mode)
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0, 12’ at line 8]
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc FROM wp_posts LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta ON ( orderby_event_date_utc_meta.post_id = wp_posts.ID AND orderby_event_date_utc_meta.meta_key = ‘_EventStartDateUTC’ ) WHERE 1=1 AND wp_posts.post_password != ” AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status <> ‘trash’ AND wp_posts.post_status <> ‘auto-draft’)) GROUP BY wp_posts.ID ORDER BY event_date_utc ASC, LIMIT 0, 12WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0, 13’ at line 19]
SELECT wp_posts.ID, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc, CAST( orderby_event_duration_meta.meta_value AS DECIMAL ) AS event_duration FROM wp_posts LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = ‘_EventHideFromUpcoming’ ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta ON ( orderby_event_date_utc_meta.post_id = wp_posts.ID AND orderby_event_date_utc_meta.meta_key = ‘_EventStartDateUTC’ ) LEFT JOIN wp_postmeta AS orderby_event_duration_meta ON ( orderby_event_duration_meta.post_id = wp_posts.ID AND orderby_event_duration_meta.meta_key = ‘_EventDuration’ ) WHERE 1=1 AND ( wp_postmeta.post_id IS NULL AND ( mt1.meta_key = ‘_EventEndDateUTC’ AND CAST(mt1.meta_value AS DATETIME) > ‘2021-05-06 15:52:11’ ) ) AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY event_date_utc ASC, event_duration ASC, LIMIT 0, 13WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0, 12’ at line 10]
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta ON ( orderby_event_date_utc_meta.post_id = wp_posts.ID AND orderby_event_date_utc_meta.meta_key = ‘_EventStartDateUTC’ ) WHERE 1=1 AND ( ( wp_postmeta.meta_key = ‘_EventStartDateUTC’ AND CAST(wp_postmeta.meta_value AS DATETIME) > ‘2021-05-05 23:00:00’ ) ) AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY event_date_utc ASC, LIMIT 0, 12WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘LIMIT 0, 12’ at line 8]
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID, CAST( orderby_event_date_utc_meta.meta_value AS DATETIME ) AS event_date_utc FROM wp_posts LEFT JOIN wp_postmeta AS orderby_event_date_utc_meta ON ( orderby_event_date_utc_meta.post_id = wp_posts.ID AND orderby_event_date_utc_meta.meta_key = ‘_EventStartDateUTC’ ) WHERE 1=1 AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status = ‘publish’)) GROUP BY wp_posts.ID ORDER BY event_date_utc ASC, LIMIT 0, 12`We’re running TEC version 5.6.0 on WP version 5.7.1
Any ideas what might be causing the error?
TIA.
- The topic ‘WordPress database error’ is closed to new replies.