Drezard Posted December 10, 2006 Share Posted December 10, 2006 hello, I have a problem with this line of code:[CODE]$query = "INSERT INTO profiles (user, email, name, add, sub, postcode, state) VALUES ('$user', '$email', '$name', '$add', '$sub', '$post', '$state')";[/CODE]It comes up with this error when i try and execute that query:[QUOTE]Error in query: INSERT INTO profiles (user, email, name, add, sub, postcode, state) VALUES ('drezard54', 'adgadf', 'adfgdafgadgadg', 'adgadf', 'adgadf', 'adgadf', 'adgadf').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 'add, sub, postcode, state) VALUES ('drezard54', 'adgadf', 'adfgdafgadgadg', 'adg' at line 1[/QUOTE]I dont understand whats wrong with my query?- Cheers, Daniel Link to comment https://forums.phpfreaks.com/topic/30108-mysql-problem-solved/ Share on other sites More sharing options...
drifter Posted December 10, 2006 Share Posted December 10, 2006 check the reserved word list... is add on there? Link to comment https://forums.phpfreaks.com/topic/30108-mysql-problem-solved/#findComment-138419 Share on other sites More sharing options...
Drezard Posted December 10, 2006 Author Share Posted December 10, 2006 Yeap it works. Thanks, Daniel Link to comment https://forums.phpfreaks.com/topic/30108-mysql-problem-solved/#findComment-138441 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.