On Saturday 12 January 2002 00:20, Mike Gifford wrote:
> Hello,
>
> Thanks for your quick reply..  I'm trying to improve the stats feature
> for gcdb (a pretty decent little PHP/MySQL accounting package on SF.net)
>
> On Fri, 2002-01-11 at 05:24, DL Neil wrote:
> > Have you posted all of the relevant code - for example, how the 'result'
> > is limited to three month's worth of data???
>
> I didn't provide all of the code in the initial response as it was using
> a wrapper so I didn't know how relevant it would be..  However, your
> note made me realize that I could rewrite the code without the
> wrapper..  It still worked the same way.  The code stands as:
>
> $sql = " SELECT COUNT(DateBilled) AS count, MONTH(DateBilled) AS
> BilledMonth, YEAR(DateBilled) AS BilledYear FROM Invoices GROUP BY
> MONTH(DateBilled) ORDER BY DateBilled DESC";
> $monthly_result = mysql_query($sql, $db);
> $monthly_row = DBfetch_array($monthly_result);

You've already used the first row of results (without processing it).


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk

/*
"I'd love to go out with you, but I did my own thing and now I've got
to undo it."
*/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to