update query

Reply

Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

update query

 
0
  #1
Aug 16th, 2009
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
  1.  
  2. mysql_query("UPDATE lesson SET(`subject`= '{$ins_subject}',`year`='{$ins_year}',`noofstudents`='{$ins_noofstudents}',
  3. `minutes`='{$ins_minutes}',`ability`='{$ins_ability}',`learningArea`='{$ins_learningArea}',`objectives`='{$ins_objectives}',
  4. `LO`='{$ins_LO}',`skills`='{$ins_skills}',`prerequisite`='{$ins_prerequisite}',`resources`='{$ins_resources}',`introduction`='{$ins_introduction}',
  5. `activity`='{$ins_activity}',`step2`='{$ins_step2}',`step3`='{$ins_step3}',`step4`='{$ins_step4}',`assessment`='{$ins_assessment}',
  6. `reflection`='{$ins_reflection}',`closure`='{$ins_closure}',`extension`='{$ins_extension}',`author`='{$ins_author}') WHERE lessonID='$id'") ;
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 150
Reputation: sDJh is an unknown quantity at this point 
Solved Threads: 13
sDJh sDJh is offline Offline
Junior Poster

Re: update query

 
0
  #2
Aug 16th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

Re: update query

 
0
  #3
Aug 17th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 257
Reputation: BzzBee is an unknown quantity at this point 
Solved Threads: 37
BzzBee BzzBee is offline Offline
Posting Whiz in Training

Re: update query

 
0
  #4
Aug 17th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 40
Reputation: phpbeginners is an unknown quantity at this point 
Solved Threads: 3
phpbeginners phpbeginners is offline Offline
Light Poster

Re: update query

 
0
  #5
Aug 17th, 2009
try to remove all { } just use ' '
remove also all ``

EXAMPLE -----> UPDATE lesson SET(subject= '$ins_subject', year = '$ins_year', .....................
Last edited by phpbeginners; Aug 17th, 2009 at 9:20 am.
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 81
Reputation: tulipputih is an unknown quantity at this point 
Solved Threads: 0
tulipputih tulipputih is offline Offline
Junior Poster in Training

Re: update query

 
0
  #6
Aug 19th, 2009
Hello,
thanks for your suggestions..
It was settled ..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC