I have a database of employee time logs and i have it already working perfectly and set to order by the date. Is there a way to not only order the output (a table with 6 fields) by the date but also by the username. Right now it comes out like this
Userid Date
name1 July 06 2004
name2 July 06 2004
name2 July 06 2004
name1 July 06 2004
name3 July 07 2004
name2 July 08 2004
And i want this
Userid Date
name1 July 06 2004
name1 July 06 2004
name2 July 06 2004
name2 July 06 2004
name1 July 07 2004
name2 July 08 2004
Here is the sql query i am using to display the data. If you need more code for a frame of reference tell me and ill post the whole thing.
Userid Date
name1 July 06 2004
name2 July 06 2004
name2 July 06 2004
name1 July 06 2004
name3 July 07 2004
name2 July 08 2004
And i want this
Userid Date
name1 July 06 2004
name1 July 06 2004
name2 July 06 2004
name2 July 06 2004
name1 July 07 2004
name2 July 08 2004
Here is the sql query i am using to display the data. If you need more code for a frame of reference tell me and ill post the whole thing.
Code:
$result = mysql_query("SELECT * FROM $dbtable ORDER BY date ASC",$authentication);