Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Wednesday, November 11, 2026
About Us
Magazine
Open Source
CVS
Services
Index  »  Projects  »  phpMyEdit  »  Forum  »  getting MySQL error 1064 when using a field named `order`

phpMyEdit General     getting MySQL error 1064 when using a field named `order`
Post new topic   Reply to topic    
 
mac     Joined: 04 Nov 2006   Posts: 4  
Post Posted: 2006-11-04 23:38
Back to top  Reply with quote     

I noticed that the system cannot edit the record of any table if it has a field named `order`.

The sql query made (from function phpMyEdit::myquery)
is
SELECT name,url_link,description,order FROM people
WHERE (id=9)

and it crashes.

Why not use
SELECT `name`,`url_link`,`description`,`order` FROM `people`
WHERE (id=9)

instead?

By adding ` around the field or table names, it eliminates the possibility to the mySQL engine misunderstanding the fieldname `order` with the command ORDER BY.

Thanks!
Mac[/b]

 
westdesign     Joined: 20 Nov 2006   Posts: 2  
Post Posted: 2006-11-20 16:43
Back to top  Reply with quote     

This is generaly for all "reserved words"

 
Post new topic   Reply to topic    

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy