[Israel.pm] Sorting By MySQL DATETIME Fields?

Jorge Grippo jorge at grippo.com
Wed Jun 16 02:49:32 PDT 2004

Hi Yuval

Prepare your queries with date_format to return the dates in the format:
After that you can use 'sort' to sort them.


----- Original Message -----
From: "Yuval Yaari" <yuval at windax.com>
To: "Perl in Israel" <perl at perl.org.il>
Sent: Wednesday, June 16, 2004 11:14 AM
Subject: [Israel.pm] Sorting By MySQL DATETIME Fields?

> Hi,
> I had a query that used JOIN and took too much time (4 seconds).
> I figured Perl could handle it much faster, and so it did.
> I am using 2 queries now.
> At the end, I have an array of $sth->fetchrow_hashref() which I would
> like to sort by date (since it's in 2 queries, I can't ORDER BY Date).
> Is there a module or hack to do this?
>   --Yuval
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl

More information about the Perl mailing list