mysql error
Hi there folks,
I'm getting some error with this line and i can't find what is rong: mysql_query("INSERT INTO order (name, addr, country, clan, chan, email) VALUES ('$name', '$addr', '$country', '$clan', '$chan', '$email')") or die("Couldn't connect!" . mysql_error()); The vars exist and have values. It's giving me this error: You have an error in your SQL syntax near 'order (name, addr, country, clan, chan, email) VALUES ('alex', 'lol', 'lo', 'lo'' at line 1 Thanks in advance |
order is a reserved word. change it to "orders" or something similar
|
Thanks a lot mate.
btw, how can i change the table name? I have a lot of work there and i dont want to waste it :\ |
a simple look at the mysql manual says:
ALTER name RENAME [TO] newname |
Thanks a lot mate, but i can't do that due to the reserved word... if I place ORDER in the SQL the database assumes ORDER as the reserved name of SQL and not as a table name
Thamks anyway mate [] |
Try using backquotes (`) for table name...
|
Thanks a lot!
[][] |
All times are GMT -5. The time now is 01:53 PM. |