econd query to get the grand total hours.
mysql> SELECT SUM ( hours ) AS 'g_total'
> FROM log WHERE id='$id' AND YEAR ( period ) >= '$sy' AND YEAR ( period ) <
'$ey';
Now, if you know a way that MySQL can extract the grand total from the first
Leif,
> What a thorough and thoughtful response! It works like a charm.
>
> I'd like to generate a report based on all 12 months of the year but
for
> some strange reason (and I'm guessing you already knew this) the
method you
> suggested only works up to 11. Why is this? What should I do?
>
>
ED]
Subject: Re: creating dream tables
Leif,
This is a bit of a mind-bender, but quite easy to do:-
> i'm trying to select data from a table and format it in an html table
(using
> php) but i want mysql to do as much of the hard work as possible.
I'll agree with/encourage that ph
Leif,
This is a bit of a mind-bender, but quite easy to do:-
> i'm trying to select data from a table and format it in an html table (using
> php) but i want mysql to do as much of the hard work as possible.
I'll agree with/encourage that philosophy.
> i'm selecting data from a table with colu