Title: Recurring WordPress database error message in PHP Error Log
Last modified: December 30, 2022

---

# Recurring WordPress database error message in PHP Error Log

 *  Resolved [davidsonh](https://wordpress.org/support/users/davidsonh/)
 * (@davidsonh)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/recurring-wordpress-database-error-message-in-php-error-log/)
 * Hello TEC Community,
 * Over the Christmas holiday several of our automated backups failed because our
   host’s disk storage space had been filled with the following recurring error:
 *     ```wp-block-code
       [29-Dec-2022 12:52:32 UTC] WordPress database error Unknown column '**db_name**_tec_occurrences.occurrence_id' in 'group statement' for query
                                               SELECT SQL_CALC_FOUND_ROWS  **db_name**_posts.ID
                                               FROM **db_name**_posts  LEFT JOIN **db_name**_term_relationships ON (**db_name**_posts.ID = **db_name**_term_relationships.object_id)
                                               WHERE 1=1  AND (
         **db_name**_posts.ID NOT IN (
                                       SELECT object_id
                                       FROM **db_name**_term_relationships
                                       WHERE term_taxonomy_id IN (7,9)
                               )
         AND
         **db_name**_term_relationships.term_taxonomy_id IN (1617)
       ) AND ((**db_name**_posts.post_type = 'tribe_events' AND (**db_name**_posts.post_status = 'publish' OR **db_name**_posts.post_status = 'acf-disabled' OR **db_name**_posts.post_status = 'tribe-ea-success' OR **db_name**_posts.post_status = 'tribe-ea-failed' OR **db_name**_posts.post_status = 'tribe-ea-schedule' OR **db_name**_posts.post_status = 'tribe-ea-pending' OR **db_name**_posts.post_status = 'tribe-ea-draft'))) AND **db_name**_posts.ID IN (0)
                                               GROUP BY **db_name**_tec_occurrences.occurrence_id
                                               ORDER BY **db_name**_posts.menu_order ASC, **db_name**_posts.post_title ASC
                                               LIMIT 0, 20
                                        made by require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array('pre_get_posts'), WP_Hook->do_action, WP_Hook->apply_filters, FacetWP_Request->update_query_vars, FacetWP_Renderer->render, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, apply_filters_ref_array('posts_pre_query'), WP_Hook->apply_filters, TEC\Events\Custom_Tables\V1\WP_Query\Modifiers\Events_Only_Modifier->filter_posts_pre_query, TEC\Events\Custom_Tables\V1\WP_Query\Custom_Tables_Query->get_posts, WP_Query->get_posts
       ```
   
 * I know Advanced Custom Fields and Facet WP get a mention, but 90% of the lines
   reference TEC or tribe.
 * We display our events in a Widget if that helps.
 * Thanks,
 * Hunter
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frecurring-wordpress-database-error-message-in-php-error-log%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [WilloftheD](https://wordpress.org/support/users/abzlevelup/)
 * (@abzlevelup)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/recurring-wordpress-database-error-message-in-php-error-log/#post-16355472)
 * Hi [@davidsonh](https://wordpress.org/support/users/davidsonh/), apologies for
   the delay here. Curious.
 * Curious, I wonder if there are corrupted files. Could you try re-installing with
   the same setup and see if that’s still the case? Unknown Database usually from
   incomplete migrations or installations.
 * To be safe, we’d recommend conducting tests and updates on a [Staging Server](https://theeventscalendar.com/knowledgebase/k/creating-and-using-a-wordpress-staging-site/).
   Also, please keep a working backup of your website.
 * Please keep me posted.
 *  Plugin Support [Darian](https://wordpress.org/support/users/d0153/)
 * (@d0153)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/recurring-wordpress-database-error-message-in-php-error-log/#post-16404343)
 * Hi [@davidsonh](https://wordpress.org/support/users/davidsonh/)
 * This thread has been inactive for a while, so we’ll go ahead and mark it **Resolved**.
   Please open a new thread if any other questions arise, and we’d be happy to help.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Recurring WordPress database error message in PHP Error Log’ is closed
to new replies.

 * ![](https://ps.w.org/the-events-calendar/assets/icon-256x256.gif?rev=2516440)
 * [The Events Calendar](https://wordpress.org/plugins/the-events-calendar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/the-events-calendar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/the-events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/the-events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/the-events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/the-events-calendar/reviews/)

## Tags

 * [php error log](https://wordpress.org/support/topic-tag/php-error-log/)

 * 2 replies
 * 3 participants
 * Last reply from: [Darian](https://wordpress.org/support/users/d0153/)
 * Last activity: [3 years, 2 months ago](https://wordpress.org/support/topic/recurring-wordpress-database-error-message-in-php-error-log/#post-16404343)
 * Status: resolved