Jump to content

RUN MULTIPLE UPDATE BASED ON CONDION


bambookaat

Recommended Posts

PLease see the programme and suggest an error in it. IT is only entering a Last value in the table.

 

Why?

 

 

if($programme=='CE')

$sql6=mysql_query("update registrationsep07sep07 set subject='CE001D' where regno='$del_id'");

$sql7=mysql_query("update registrationsep07sep07 set subject='CE002D' where regno='$del_id'");

$sq18=mysql_query("update registrationsep07sep07 set subject='CE003D' where regno='$del_id'");

$sql19=mysql_query("update registrationsep07sep07 set subject='CS036D'where regno='$del_id'");

$sql20=mysql_query("update registrationsep07sep07 set subject='MA001D'where regno='$del_id'");

 

if($programme=='CSE')

$sq21=mysql_query("update registrationsep07sep07 set subject='CS001D' where regno='$del_id'");

$sql7=mysql_query("update registrationsep07sep07 set subject='CS002D' where subject<>'MA001D' and regno='$del_id'");

$sql8=mysql_query("update registrationsep07sep07 set subject='EE001D' where regno='$del_id'");

$sql9=mysql_query("update registrationsep07sep07 set subject='EE007D' where regno='$del_id'");

$sql20=mysql_query("update registrationsep07sep07 set subject='MA001D' where regno='$del_id'");

 

if($programme=='EE')

$sql21=mysql_query("update registrationsep07sep07 set subject='EE001D' where regno='$del_id'");

$sql22=mysql_query("update registrationsep07sep07 set subject='EE002D' where regno='$del_id'");

$sql23=mysql_query("update registrationsep07sep07 set subject='EE003D' where regno='$del_id'");

$sql24=mysql_query("update registrationsep07sep07 set subject='EE004D' where regno='$del_id'");

$sql25=mysql_query("update registrationsep07sep07 set subject='MA001D' where regno='$del_id'");

 

O

Link to comment
https://forums.phpfreaks.com/topic/78381-run-multiple-update-based-on-condion/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.