Please support our MySQL advertiser: Programming Forums
Views: 1697 | Replies: 2
![]() |
•
•
•
•
| |
This sql command is for PHP but this is what happen to it after php had made chenges:
I get this error both places php and mysql client it self:
MySQL said:
You have an error in your SQL syntax near 'TABLE = 'Harrow_VH' WHERE Name = 'Variable Action Harrow'' at line 1
Please help as i have no idea what to do and tried everthing i knew...
UPDATE Catalog SET Table='Harrow_VH' WHERE Name='Variable Action Harrow'
I get this error both places php and mysql client it self:
MySQL said:
You have an error in your SQL syntax near 'TABLE = 'Harrow_VH' WHERE Name = 'Variable Action Harrow'' at line 1
Please help as i have no idea what to do and tried everthing i knew...
•
•
Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 345
Reputation:
Rep Power: 4
Solved Threads: 4
Your question is constructed in way making it difficult to read, but I have 1 thing for you.
"table" is a reserved word in MySQL. You should not name a colulmn "table". You can use reserved words, but in your queries, you'll have to put brackets around the reserved word like this:
[PHP]
$sql = "UPDATE Catalog SET [Table] = 'Harrow_VH' WHERE Name = 'Variable Action Harrow'";
[/PHP]
But do yourself a favor, do not name any objects in your database using any of the reserved words.
"table" is a reserved word in MySQL. You should not name a colulmn "table". You can use reserved words, but in your queries, you'll have to put brackets around the reserved word like this:
[PHP]
$sql = "UPDATE Catalog SET [Table] = 'Harrow_VH' WHERE Name = 'Variable Action Harrow'";
[/PHP]
But do yourself a favor, do not name any objects in your database using any of the reserved words.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Hybrid Mode