Title: WordPress database error SQL syntax
Last modified: May 25, 2024

---

# WordPress database error SQL syntax

 *  [Gene Hassell](https://wordpress.org/support/users/ghassell/)
 * (@ghassell)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-sql-syntax-4/)
 * I get this error over and over and over and it quickly fills up the error log.
 * You have an error in your SQL syntax; check the manual that corresponds to your
   MariaDB server version for the right syntax to use near ‘WHERE group_id IN (1)
   AND is_confirmed = 1 AND (is_admin = 0 AND is_mod = 0 A…’ at line 1 for query
   SELECT user_id FROM WHERE group_id IN (1) AND is_confirmed = 1 AND (is_admin 
   = 0 AND is_mod = 0 AND is_banned = 0) ORDER BY date_modified DESC made by require_once(‘
   wp-load.php’), require_once(‘wp-config.php’), require_once(‘wp-settings.php’),
   do_action(‘init’), WP_Hook->do_action, WP_Hook->apply_filters, bbp_init, do_action(‘
   bbp_init’), WP_Hook->do_action, WP_Hook->apply_filters, bbp_register, do_action(‘
   bbp_register’), WP_Hook->do_action, WP_Hook->apply_filters, bbp_register_post_types,
   do_action(‘bbp_register_post_types’), WP_Hook->do_action, WP_Hook->apply_filters,
   bbPress::register_post_types, current_user_can, user_can, WP_User->has_cap, apply_filters(‘
   user_has_cap’), WP_Hook->apply_filters, Zqe\Genealogical_Tree_Admin->bp_manage_capabilities,
   groups_get_group_members, BP_User_Query->__construct, BP_User_Query->prepare_user_ids_query,
   BP_Group_Member_Query->get_include_ids, BP_Group_Member_Query->get_group_member_ids

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

 *  [Stef](https://wordpress.org/support/users/serafinnyc/)
 * (@serafinnyc)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-sql-syntax-4/#post-17780822)
 * Hello [@ghassell](https://wordpress.org/support/users/ghassell/) I think you’re
   missing a table that’s related to a BuddyPress instance. Most likely `bp_groups_members`
   is missing. Check your tables and see if that one’s there.
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-sql-syntax-4/#post-17781235)
 * Sometimes it is sufficient to deactivate and reactivate the plugin in question,
   which sets the missing tables. If there was relevant content in these, it would
   be advisable to import a backup.

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

The topic ‘WordPress database error SQL syntax’ is closed to new replies.

## Tags

 * [MariaDB](https://wordpress.org/support/topic-tag/mariadb/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)
 * [WordPress database error](https://wordpress.org/support/topic-tag/wordpress-database-error/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 3 participants
 * Last reply from: [threadi](https://wordpress.org/support/users/threadi/)
 * Last activity: [1 year, 10 months ago](https://wordpress.org/support/topic/wordpress-database-error-sql-syntax-4/#post-17781235)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
