Title: Database error message appearing
Last modified: May 4, 2023

---

# Database error message appearing

 *  Resolved [hoardinghopes](https://wordpress.org/support/users/hoardinghopes/)
 * (@hoardinghopes)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/database-error-message-appearing/)
 *     ```wp-block-code
       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 'AND author_id = 0' at line 1]
       SELECT * FROM wp_ayssurvey_surveys WHERE status != 'trashed' ORDER BY id DESC AND author_id = 0
       ```
   
 * I’m seeing the above error message with Survey Maker 3.4.5. It looks as if the
   query has been constructed in the wrong order?
 * I’ve run it manually against the database and hit the same message, but it works
   if I rearrange the query to:
 *     ```wp-block-code
       SELECT * FROM wp_ayssurvey_surveys WHERE status != 'trashed' AND author_id=0 ORDER BY id DESC;
       ```
   
 * This is not breaking the survey or the site as far as I can tell, but it’s clearly
   not doing something it wants to.

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

 *  Plugin Support [Jasmine](https://wordpress.org/support/users/hyenokian/)
 * (@hyenokian)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/database-error-message-appearing/#post-16710610)
 * Dear [@hoardinghopes](https://wordpress.org/support/users/hoardinghopes/),
 * Thank you for the topic.
 * I am sorry for the problem you are experiencing. 
   We have checked and found the
   problem you are mentioning.
 * We will surely fix the issue in the **upcoming** **update **of the plugin. 
   For
   now, please contact us via [this form](https://ays-pro.com/contact) so that we
   can provide you with the **fixed** **zip file **as soon as possible.
 * Thank you.
 *  Thread Starter [hoardinghopes](https://wordpress.org/support/users/hoardinghopes/)
 * (@hoardinghopes)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/database-error-message-appearing/#post-16711125)
 * Thanks Jasmine
 *  Plugin Support [Jasmine](https://wordpress.org/support/users/hyenokian/)
 * (@hyenokian)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/database-error-message-appearing/#post-16711136)
 * Dear [@hoardinghopes](https://wordpress.org/support/users/hoardinghopes/),
 * Thank you for your reply and patience.
 * I am glad to inform you that we have already **fixed **the issue in the **latest
   version **of the plugin and updated it accordingly. 
   So, you can **update the
   plugin to the latest version **and check the case again.
 * Thank you.

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

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

 * ![](https://ps.w.org/survey-maker/assets/icon-256x256.png?rev=2444244)
 * [Survey Maker by AYS](https://wordpress.org/plugins/survey-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/survey-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/survey-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/survey-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/survey-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/survey-maker/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jasmine](https://wordpress.org/support/users/hyenokian/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/database-error-message-appearing/#post-16711136)
 * Status: resolved