Jump to content

How to combine multiple Updates


shadowskill

Recommended Posts

$rem1 = "UPDATE `subjecttaken` SET `Remarks`= 'FAILED' WHERE `Grade` < '75' and `SNum`='$SNum' ";
mysql_query($rem1);
$rem2 = "UPDATE `subjecttaken` SET `Remarks`= 'PASSED' WHERE `Grade` > '75'  and `SNum`='$SNum' ";
mysql_query($rem2);
$rem3 = "UPDATE `subjecttaken` SET `Remarks`= 'No Grade' WHERE `Grade` = ''  and `SNum`='$SNum' ";
mysql_query($rem3);
$rem4 = "UPDATE `subjecttaken` SET `Remarks`= 'PASSED' WHERE `Grade` = '75'  and `SNum`='$SNum' ";
mysql_query($rem4);
$rem5 = "UPDATE `subjecttaken` SET `Remarks`= 'INCOMPLETE' WHERE `Grade` = 'INC'  and `SNum`='$SNum' ";
mysql_query($rem5);
 

My problem about this is it loads too long so im guessing its because of i have lots to update?

There is a possibility of combing all of them into one right? That will also lessen the loading?

Link to comment
https://forums.phpfreaks.com/topic/275124-how-to-combine-multiple-updates/
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.