Reputation: 95
Error
INSERT INTO PENILAIAN (ID,KURSUSID,QUEST1,QUEST2,QUEST3,QUEST4,QUEST5,QUEST6,QUEST7,QUEST8,QUEST9,QUEST10)VALUES ('951019105851', ''13'', '1', '2', '3', '4', '4', '5', '4', '5', '4', '5')
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 '13'', '1', '2', '3', '4', '4', '5', '4', '5', '4', '5')' at line 3
code
"INSERT INTO PENILAIAN (ID,KURSUSID,QUEST1,QUEST2,QUEST3,QUEST4,QUEST5,QUEST6,QUEST7,QUEST8,QUEST9,QUEST10)VALUES
('$login_sessionID',
'$kid','$QUEST1','$QUEST2','$QUEST3','$QUEST4','$QUEST5','$QUEST6','$QUEST7','$QUEST8','$QUEST9','$QUEST10')";
Upvotes: 0
Views: 117
Reputation: 9
I think you have double quotes on ''13''. olso i want to ask, does any of the values contain quotes? like this (I'am x) if you use quotes you should use mysql_real_escape_string when you POST
Upvotes: 0
Reputation: 38609
Error simply guides you
''13''
^ ^
there is additional single quote
'
pair for codeUpvotes: 1