Title: Error in SQL syntax
Last modified: May 21, 2020

---

# Error in SQL syntax

 *  Resolved [Gary Darling](https://wordpress.org/support/users/garydarling/)
 * (@garydarling)
 * [6 years ago](https://wordpress.org/support/topic/error-in-sql-syntax-12/)
 * I have a dropdown in my form that selects a custom post type. The query works
   as the dropdown is populated, but my error log is filling up with the following:
 * WordPress database error You have an error in your SQL syntax; check the manual
   that corresponds to your MySQL server version for the right syntax to use near
 * `'condobuilding' ORDER BY post_title asc' at line 1 for query`
 *     ```
       SELECT post_title FROM wp_posts 
       WHERE post_type = 'condobuilding' 
       ORDER BY post_title asc
       ```
   
 * In the error log those single quotes around the name of my custom post type actually
   show up as the ASCII equivalent (& + #039), but this forum editor is converting
   them. Are they ASCII in the query code, and is that what is causing all the error
   messages?
    -  This topic was modified 6 years ago by [Gary Darling](https://wordpress.org/support/users/garydarling/).

Viewing 1 replies (of 1 total)

 *  Plugin Support [Zhanna Khachatryan](https://wordpress.org/support/users/zhannak/)
 * (@zhannak)
 * [6 years ago](https://wordpress.org/support/topic/error-in-sql-syntax-12/#post-12884397)
 * Hello Gary,
 * Thanks for your inquiry.
 * With our plugin’s latest version, this issue is solved, please update the plugin
   and check again.

Viewing 1 replies (of 1 total)

The topic ‘Error in SQL syntax’ is closed to new replies.

 * ![](https://ps.w.org/form-maker/assets/icon-256x256.png?rev=2068681)
 * [Form Maker by 10Web - Mobile-Friendly Drag & Drop Contact Form Builder](https://wordpress.org/plugins/form-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/form-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/form-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/form-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/form-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/form-maker/reviews/)

## Tags

 * [query](https://wordpress.org/support/topic-tag/query/)

 * 1 reply
 * 2 participants
 * Last reply from: [Zhanna Khachatryan](https://wordpress.org/support/users/zhannak/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/error-in-sql-syntax-12/#post-12884397)
 * Status: resolved