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 Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
Drezard Posted December 10, 2006 Author Share Posted December 10, 2006 Yeap it works. Thanks, Daniel Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.