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
Robert, You should be able to just do: SELECT * FROM access_tracking WHERE user = '$user_id' ORDER BY time DESC,date_accessed ASC; Just experiment with the ORDER BY columns and the ASC and DESC orders to get the results you're looking for. Hope this helps, Rich > -Original Message- > Fr

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