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> "._OR;?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php