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 Quote 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 Quote 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')"; Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.