Quicker calculations on MySQL
- From: "Brian" <not@xxxxxxxxx>
- Date: Tue, 31 May 2005 14:01:51 GMT
Hi all
I'm running a query in a PHP script. At the moment I have having to run a
while ($myrow = mysql_fetch_array($result)) {...
As it loops though is has to add up a number of columns, is there a quicker
sql statement then doing this the following
if ($ch == 'n') {
$notrecognisedcount = $myrow[ord];
}
if ($ch == 'u') {
$discontinuedcount = $myrow[ord];
}
if ( ($ch != 'n') && ($ch != 'u') ) {
$validorderscount = $myrow[ord];
$delivered = $myrow[del];
}
Brian
.
- Follow-Ups:
- Re: Quicker calculations on MySQL
- From: Joseph Melnick
- Re: Quicker calculations on MySQL
- From: MS
- Re: Quicker calculations on MySQL
- Prev by Date: Re: How to change pictures everyday using php
- Next by Date: Followup Question Re: Read/write Excel spread*** libraries
- Previous by thread: PHP IP Checking...
- Next by thread: Re: Quicker calculations on MySQL
- Index(es):