kts Posted December 23, 2007 Share Posted December 23, 2007 $add_lyric_query = "INSERT INTO lyrics ('song', 'band', 'album', 'lyrics') VALUES ($song, $band, $album, $lyrics)"; not sure why that would syntax error, it looks fine to me Link to comment https://forums.phpfreaks.com/topic/82865-solved-syntax-error-for-insert/ Share on other sites More sharing options...
asmith Posted December 23, 2007 Share Posted December 23, 2007 code please Link to comment https://forums.phpfreaks.com/topic/82865-solved-syntax-error-for-insert/#findComment-421557 Share on other sites More sharing options...
trq Posted December 23, 2007 Share Posted December 23, 2007 The sibngle quotes need to be around your values, not fields. $add_lyric_query = "INSERT INTO lyrics (song, band, album, lyrics) VALUES ('$song', '$band', '$album', '$lyrics')"; Link to comment https://forums.phpfreaks.com/topic/82865-solved-syntax-error-for-insert/#findComment-421561 Share on other sites More sharing options...
kts Posted December 24, 2007 Author Share Posted December 24, 2007 thanks, wasn't sure on syntax its been a while Link to comment https://forums.phpfreaks.com/topic/82865-solved-syntax-error-for-insert/#findComment-422684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.