Results 1 to 2 of 2
Thread: RANGE as a table column
May 12, 2010, 17:37 #1
- Join Date
- May 2010
- 0 Post(s)
- 0 Thread(s)
RANGE as a table column
I've recently upgraded from MySQL 5.0.51b to 5.1.36 and am having troubles with one of my tables. More specifically, one of the columns in that table, called Range. In the older version, it had no trouble recognizing it as a column name, but in the newer version, it seems to have become reserved or something.
It had no trouble importing the table when I upgraded, but when I do any sort of sql query (both in phpMyAdmin and my own PHP code), it throws out errors. To be exact, this error:
#1064 - 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 'Range FROM ItemTable LIMIT 0, 30' at line 1
Should I just alter the column name and my code, or is there something in the my.ini file that is making my queries go wonky?
May 12, 2010, 23:54 #2
If it's a reserved word, you can put it between backticks. Or you can rename your column.Guido - Community Team Leader
The 2013 SitePoint Awards - Nominate your heroes now!
Thinking Web: Voices of the Community
Blog - Free Flash Slideshow Widget