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'") ;

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.

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

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.

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

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

Hello,
thanks for your suggestions..
It was settled ..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.