Aha.
Comments like yours made me look again. It turns out that I could use ORDER BY
with a GROUP BY but I couldn't have it before a HAVING.
Specifically, I had
SELECT ...
GROUP BY $detailsdb.eid
ORDER BY Year, Month, Day
HAVING foobar = $numcatchoices
To fix it I changed the or
> Sorting like that doesn't get it sorted by date. Each row has a lot
of
> fields. It
> actually needs to be sorted three times by three fields, Year, Month,
and
> Day.
>
> Because the query uses a GROUP BY statement, I can't sort it in the
query.
Why? I still don't see why you can't use an ORD
Use temporary table, it is simple and fast
bill wrote:
I have a query that returns results including the fields Year, Month, and Day
that I want to sort by date.
Because of the nature of the query (it includes a GROUP BY statement), I cannot
sort it in the query.
How can I sort the results?
kind
bill wrote:
Hi André,
Sorting like that doesn't get it sorted by date. Each row has a lot of fields. It
actually needs to be sorted three times by three fields, Year, Month, and Day.
Because the query uses a GROUP BY statement, I can't sort it in the query.
MySQL offers a DATE column type. Yo
Hi André,
Sorting like that doesn't get it sorted by date. Each row has a lot of fields. It
actually needs to be sorted three times by three fields, Year, Month, and Day.
Because the query uses a GROUP BY statement, I can't sort it in the query.
André cupini wrote:
> Bill
> Try this:
>
> whil
Bill
Try this:
while ($crow=mysql_fetch_array($cresult)) {
$therow[]=$crow;
}
sort($therow);
André Cupini
Programador
[EMAIL PROTECTED]
NeoBiz - fábrica de internet
http://www.neobiz.com.br
- Original Message -
From: bill
To: [EMAIL PROTECTED]
Sent: Monday, March 17, 2003 1
6 matches
Mail list logo