John Fawcett wrote:
From: "T. H. Grejc"
How can I add more fields to query. If I write:
SELECT DISTINCT FROM_UNIXTIME(created, '%Y %M'), other_field FROM table_name ORDER BY created DESC
I loose distinction (all dates are displayed).
TNX
I don't think distinction is lost. All the rows should still be distinct (considered in their entirity).
Yes, but if I add any oter field into query I get all dates as a result (56, january's, 48 February's etc)
What are you expecting to see as a result?
I'm creating news archive and it should be sorted by months:
January 2004 (news count is 56) February 2004 (48) ...
Like ususal weblogs archives. You can see example at http://weblogs.mozillazine.org/ben/ an then check 'ARCHIVES' at the right, just below the search.
TNX
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]