[thelist] php/mysql - sort records by month?

phil phil at xlab.co.uk
Fri Feb 22 05:47:01 CST 2002


Hi,

I have a PHP and MySQL question.

In my MySQL table I have a number of records with their date field
generated by the PHP time() function, which produces an integer like
1006114779. This is great to format into a date and time string with
PHP, but how can I sort these records by a part of the date (e.g by
month or year) ?

Cheers,

Phil




More information about the thelist mailing list