Error on Search Fields
2 posts by 2 authors in: Forums > CMS Builder
Last Post: February 16, 2009 (RSS)
Searching Error: Check your 'Search fields' in the searching tab for invalid field names.
MySQL returned the following 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 'where LIKE '%test%' OR when LIKE '%test%') LIMIT 1' at line 1
Keep getting this error and I dont understand what it means? I went under the searching tab and changed the search fields to the names of my new field labels, but that didnt work.
Christine
MySQL returned the following 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 'where LIKE '%test%' OR when LIKE '%test%') LIMIT 1' at line 1
Keep getting this error and I dont understand what it means? I went under the searching tab and changed the search fields to the names of my new field labels, but that didnt work.
Christine
Re: [PalleyAd] Error on Search Fields
By Dave - February 16, 2009
Hi Christine, welcome to the CMS Builder forum! :)
I did some research and it looks like 'where' and 'when' are reserved words in MySQL. I've added some code to the next version to let you work with those fieldnames, but for now try renaming those fields to where2 and when2 (or "eventWhere" anything else so they're just not "where" and "when").
Be sure to both rename the field (by clicking modify in the field editor and changing the fieldname) and change the fieldnames listed under the searching and sorting tabs.
Hope that helps! Let me know if that fixes it for you.
I did some research and it looks like 'where' and 'when' are reserved words in MySQL. I've added some code to the next version to let you work with those fieldnames, but for now try renaming those fields to where2 and when2 (or "eventWhere" anything else so they're just not "where" and "when").
Be sure to both rename the field (by clicking modify in the field editor and changing the fieldname) and change the fieldnames listed under the searching and sorting tabs.
Hope that helps! Let me know if that fixes it for you.
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com