RE: [PHP] CPU usage @5% during 2 minutes

From: Date: Tue, 19 Oct 2004 21:22:23 +0000
Subject: RE: [PHP] CPU usage @5% during 2 minutes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199829@lists.php.net to get a copy of this message
The sample code (in seperate, this piece of code runs with normal speed, but it is this part which runs slowly when executed as a whole, everything else is fast): $sqlquery = "SELECT sh_Number, sh_Status FROM service_sheet ORDER BY sh_Number DESC"; $result = mysql_query($sqlquery) or die (mysql_error()."<br><br>"._ERROR_QUERY.": ".$sqlquery); echo " <SELECT onchange=\"this.form.service_sheet_worknum.value = this.value;\" class=\"service_sheet_list\" name=\"service_sheet\">"; while (list($shID, $shStatus, $shWNum, $custName) = mysql_fetch_row($result)) { switch ($shStatus) { case 1: $option_class = "status_1"; break; case 2: $option_class = "status_2"; break; case 3: $option_class = "status_3"; break; case 4: $option_class = "status_4"; break; case 5: $option_class = "status_5"; break; } echo "<OPTION class=\"$option_class\" value=\"$shID\">$shID</OPTION>"; } echo "</SELECT>&nbsp;&nbsp;&nbsp;&nbsp;"._OR;?>

« previous php.general (#199829) next »