woodsonoversoul Posted January 1, 2009 Share Posted January 1, 2009 I'm getting this error: Error: 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 'set, set_position) VALUES('wsp1992-07-15s1s01','/home/dan/MusicDataBase/wsp1' at line 1 from this line: $sql= "INSERT INTO songs (unique_song_id, file_location, artist, date, name, set, set_position)VALUES('$song_id','$file_location','$band', '$date','$song_name','$set_num','$set_position')"; Does anyone see anything wrong w/ my syntax? Quote Link to comment https://forums.phpfreaks.com/topic/139070-please-help-me-check-a-small-snipet-of-code/ Share on other sites More sharing options...
.josh Posted January 1, 2009 Share Posted January 1, 2009 SET is a reserved word if you want to use it as a column name, you have to put backticks around it `set` better thing to do would be to change it to a diff column name, as using reserved words is bad practice. Quote Link to comment https://forums.phpfreaks.com/topic/139070-please-help-me-check-a-small-snipet-of-code/#findComment-727348 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.