Order more than one column
I am trying to order my results, and I need to order by two colums I have this:
It doesn't work
$thread1 = "SELECT * FROM threads WHERE idnum='$threadnum' ORDER BY date AND ORDER BY time DESC";
Is there a better way to get this to order?
I would like it to be ordered by date, then by time.
you mean this...
I wonder though why date and time are two different fields?
$thread1 = "SELECT * FROM threads WHERE idnum='$threadnum' ORDER BY date, time DESC";
So when I compair, There are times I need just the time, and times I need just the date.
there are time extraction functions that you can use to compare.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)