Title: WordPress database error
Last modified: February 20, 2022

---

# WordPress database error

 *  [efinst0rm](https://wordpress.org/support/users/efinst0rm/)
 * (@efinst0rm)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-178/)
 * Hello,
 * I was looking over my logs and noticed this.
    `Got error 'PHP message: WordPress
   database error 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 ') OR prole.user_role
   IS NULL)\r\n AND (pname.usernames IS NULL)\r\n ...' at line 7 for query SELECT
   count(*) from (select posts.ID from wp_posts AS posts\r\nLEFT JOIN wp_wnbell_recipients_role
   AS prole ON (posts.ID=prole.notification_id)\r\nLEFT JOIN wp_wnbell_recipients
   AS pname ON (posts.ID=pname.notification_id)\r\n WHERE posts.post_type = 'wnbell_notifications'\
   r\n AND posts.post_status = 'publish'\r\n AND posts.ID>55490\r\n AND (prole.user_role
   IN() OR prole.user_role IS NULL)\r\n AND (pname.usernames IS NULL)\r\n GROUP 
   BY posts.ID ORDER BY posts.post_date DESC LIMIT 100) as subquery; made by do_action('
   wp_ajax_wnbell_list_ajax'), WP_Hook->do_action, WP_Hook->apply_filters, wnbell_list_ajax,
   wnbell_notification_list',`

Viewing 1 replies (of 1 total)

 *  Plugin Author [wpdever](https://wordpress.org/support/users/wpdever/)
 * (@wpdever)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-178/#post-15384886)
 * Hi,
 * I saw a similar error sometime ago, but I have not been able to replicate it 
   since then. I’ll keep an eye out for this and if you have any details on exactly
   when this happened, please let me know.

Viewing 1 replies (of 1 total)

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

 * ![](https://ps.w.org/wp-notification-bell/assets/icon-256x256.png?rev=2439614)
 * [WP Notification Bell](https://wordpress.org/plugins/wp-notification-bell/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-notification-bell/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-notification-bell/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-notification-bell/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-notification-bell/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [wpdever](https://wordpress.org/support/users/wpdever/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/wordpress-database-error-178/#post-15384886)
 * Status: not resolved