Re: [PHP] sorting mysql results

2005-01-10 Thread Leon Poon
Sort when querying from database: SELECT name, type FROM some_table ORDER BY type ASC, name ASC - Original Message - From: "Sebastian" <[EMAIL PROTECTED]> To: Sent: Tuesday, January 11, 2005 5:38 AM Subject: [PHP] sorting mysql results I have a list of rows in the database and i would l

Re: [PHP] sorting mysql results

2005-01-10 Thread Leif Gregory
Hello Sebastian, Monday, January 10, 2005, 2:38:18 PM, you wrote: S> if the $row['type'] is music i want to output an and the S> results below it but below the files results.. makes sense? i S> thought i remember doing this once using a dummy var but cant S> remember how. i guess i could always r

Re: [PHP] sorting mysql results

2005-01-10 Thread Andrew Kreps
On Mon, 10 Jan 2005 16:38:18 -0500, Sebastian <[EMAIL PROTECTED]> wrote: > I have a list of rows in the database and i would like to sort them in two > categories. > example, > > echo $row['name'] . '-' . $row['type']; > > // output: > > row 1 - files > add order by `type` to your sql statemen