•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 397,590 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,896 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser:
Views: 1603 | 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: 344
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)
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
- "run a dll as an app" error during driver update (Viruses, Spyware and other Nasties)
- delete a record and update the dataset (VB.NET)
- Error LU1806 /Windows XP..SP2 ..On Norton (Windows NT / 2000 / XP / 2003)
- windows update can't download (Windows NT / 2000 / XP / 2003)
- Problem using the UPDATE command in VBA (Visual Basic 4 / 5 / 6)
- UPDATE syntax error (MySQL)
- Errors in My XP Error Log. (Windows NT / 2000 / XP / 2003)
- office 2000 install error (Windows NT / 2000 / XP / 2003)
Other Threads in the MySQL Forum
- Previous Thread: Admin creates accounts OK, but I can't do it!?!
- Next Thread: need help with DISTINCT


Linear Mode