Error in SQL syntax
-
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 querySELECT post_title FROM wp_posts WHERE post_type = 'condobuilding' ORDER BY post_title ascIn 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?
The topic ‘Error in SQL syntax’ is closed to new replies.