Re: [PHP-DB] Multiple Sorts

2004-03-16 Thread kc68
I asked this question several weeks ago; search for kc68 on this list archives and you should find the more complete response. The coding with my fields is: ?sort_field=cbc asc, net_receipts&sort_order=desc Play with the order and asc and desc as another response suggested. What's confusing i

RE: [PHP-DB] Multiple Sorts

2004-03-16 Thread Hutchins, Richard
--Original Message- > From: Robert Sossomon [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 16, 2004 7:57 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Multiple Sorts > > > How can I write a sort to sort on 2 columns, one ascending, one > descending? > > $get_

[PHP-DB] Multiple Sorts

2004-03-16 Thread Robert Sossomon
How can I write a sort to sort on 2 columns, one ascending, one descending? $get_list = "select * from access_tracking where user = '$user_id' order by time,date_accessed desc" But the ordering seems backwards sorted by date first, and then time. TIA!! Robert -- PHP Database Mailing List (http

Re: [PHP-DB] Multiple Sorts??

2002-09-10 Thread Petr Tomenendál
> $result = mysql_query("SELECT * FROM pfiles WHERE cdate >= '2002-07-01' > ORDER BY 'cdate' DESC", $link); > > I would like to be able to sort this data FIRST by 'cdate' then by 'vendor' > Is this possible? Yes. Just add another sort criterium to your query like this: $result = mysql_query("SE

[PHP-DB] Multiple Sorts??

2002-09-10 Thread Chase
Is there a way that I can sort data twice when it is being pulled from the DB? Here is a sample line of my code: $result = mysql_query("SELECT * FROM pfiles WHERE cdate >= '2002-07-01' ORDER BY 'cdate' DESC", $link); I would like to be able to sort this data FIRST by 'cdate' then by 'vendor' Is