Title: Database query error
Last modified: June 9, 2018

---

# Database query error

 *  Resolved [Aldoseri](https://wordpress.org/support/users/aldoseri/)
 * (@aldoseri)
 * [8 years ago](https://wordpress.org/support/topic/database-query-error-3/)
 * Hi guys,
 * When activating WPAdvert widget I get this error message
 * [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 ‘))) AND wp_posts.post_type
   = ‘advert’ AND ((wp_posts.post_status = ‘publish’)) ‘ at line 1]
 * [SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND ((())) AND
   wp_posts.post_type = ‘advert’ AND ((wp_posts.post_status = ‘publish’)) ORDER 
   BY wp_posts.menu_order DESC, wp_posts.post_date DESC LIMIT 0, 1]

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

 *  Plugin Author [Greg Winiarski](https://wordpress.org/support/users/gwin/)
 * (@gwin)
 * [8 years ago](https://wordpress.org/support/topic/database-query-error-3/#post-10385890)
 * Hi, hmm can you let me know which widget are you activating (Adverts Categories
   or Recent Adverts)?
 * Also, do you have any plugins related to Widgets? If you do then you can try 
   disabling them one by one and see if it helps.
 * The error suggests there is some blank condition added to the query but i am 
   not yet sure where does it come from.
 *  Thread Starter [Aldoseri](https://wordpress.org/support/users/aldoseri/)
 * (@aldoseri)
 * [7 years, 11 months ago](https://wordpress.org/support/topic/database-query-error-3/#post-10445162)
 * This is to update you on the issue.
 * It turns out that the main culprit is [search everything] plugin [https://wordpress.org/support/plugin/search-everything/](https://wordpress.org/support/plugin/search-everything/)
 * after disabling the plugin everything went smoothly as expected with WPAdvert
   and other plugins.
 * Thank you for your patience.

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

The topic ‘Database query error’ is closed to new replies.

 * ![](https://ps.w.org/wpadverts/assets/icon-256x256.png?rev=2423472)
 * [WPAdverts - Classifieds Plugin](https://wordpress.org/plugins/wpadverts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpadverts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpadverts/)
 * [Active Topics](https://wordpress.org/support/plugin/wpadverts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpadverts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpadverts/reviews/)

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * 2 replies
 * 2 participants
 * Last reply from: [Aldoseri](https://wordpress.org/support/users/aldoseri/)
 * Last activity: [7 years, 11 months ago](https://wordpress.org/support/topic/database-query-error-3/#post-10445162)
 * Status: resolved