0

Hi everybody,
here is my update query ..there is no error but the record is not updated.

anybody know of what should I edit?
Many thanks

mysql_query("UPDATE lesson SET(`subject`= '{$ins_subject}',`year`='{$ins_year}',`noofstudents`='{$ins_noofstudents}',
           `minutes`='{$ins_minutes}',`ability`='{$ins_ability}',`learningArea`='{$ins_learningArea}',`objectives`='{$ins_objectives}',
		   `LO`='{$ins_LO}',`skills`='{$ins_skills}',`prerequisite`='{$ins_prerequisite}',`resources`='{$ins_resources}',`introduction`='{$ins_introduction}',
		   `activity`='{$ins_activity}',`step2`='{$ins_step2}',`step3`='{$ins_step3}',`step4`='{$ins_step4}',`assessment`='{$ins_assessment}',
		   `reflection`='{$ins_reflection}',`closure`='{$ins_closure}',`extension`='{$ins_extension}',`author`='{$ins_author}')    WHERE lessonID='$id'") ;
4
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by tulipputih
0

How about trying your WHERE-Clause? My best advice is to echo your query, examine it and check Mysql_error() or just copy and paste it to PHPmyAdmin. Some sort of this question can't and won't be answered by anyone here in the forum.

0

Thanks sDjH,
I have tried as what you suggest.
here is the 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 '' at line 1.

I tried to understand what it is..but still was not able to solve it.
Any suggestion?
Thanks

0

check all the quotes and commas and braces, perhaps your are missing some thing that's way problem is arising. and there is no need to apply braces around the variables.

0

try to remove all { } just use ' '
remove also all ``

EXAMPLE -----> UPDATE lesson SET(subject= '$ins_subject', year = '$ins_year', .....................

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.