Afternoon,
I have this page that takes upwards of 20 seconds to load--locally. Basically it just keeps repeating the same query with different parameters. It was the only way I could get it to count correctly. What I would like to know is is there a better way-- a slimmed down ,faster way.
Heres what I have:
$BAquery = "SELECT * from Yardcheck.dbo.vwCountDailyYC
where Source = '".urldecode($_REQUEST['Source'])."'
and UpLoadDate= '$UpLoadDate'
and AMPM='$AMPM' and Status = 'Off Rent'
and classification = 'Bales'
order by CargoType,Length DESC";
$BAresult = mssql_query($BAquery) or die ("Could not do, what you ask of me, sorry man. Check your Code!");
echo "<h3><br><center>BA = Bales</center></h3>";
if(mssql_num_rows($BAresult)==0){
echo "<h3><center>No Pool Trailers
to display</center></h3>";
echo "<hr>";
}else{
echo "<table class=\"summary\">";
echo "<TR class=\"blue\">
<td>Status</td>
//table headers go here
<td>Time</td>
</tr>";
while($BARow = mssql_fetch_array($BAresult))
{
$classcount = mssql_num_rows($BAresult);
echo "<TR><TD>";
echo $BARow["Status"];
echo "</td><TD>";
echo $BARow["TrailerID"];
echo "</td><TD>";
echo $BARow["Specialty"];
//assorted rows go here
echo "</td></tr>";
}echo "</TABLE>";
echo "<table><TR class=\"blue\"><td>$classcount Bale Pool Trailers
</td></tr></table>";
}