MySQL Error

4 posts by 2 authors in: Forums > CMS Builder
Last Post: February 19, 2008   (RSS)

By IronVictory - February 19, 2008

I am running MySQL version 4.1.21.
I get this error when I view the live page and in the admin:

MySQL 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 'ASC LIMIT 25 OFFSET 0' at line 1

Peter

Re: [IronVictory] MySQL Error

By Dave - February 19, 2008

Hi Peter, welcome aboard! :)

What version of CMS Builder are you using? (Check under Admin > General > Program Version). And does the error occur on all sections or just some?

My first guess is that you have a field name in one of the sections that is a reserved MySQL keyword (such as "order"). Check the "List Order" and "Order By" fields and if you have a field like that put `backticks` around it. The backtick key is beside the 1 key on my keyboard. Putting `backticks` around reserved fields let's MySQL know it's not a special command.

So if you had: order ASC, date DESC, title
Change that to: `order` ASC, date DESC, title

Let me know if that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] MySQL Error

By IronVictory - February 19, 2008

Hi Dave,
I found the error. To benefit others:

I had: community, ASC
It should be: community ASC (no comma)

BTW CMS Builder is v1.09

Peter