Why is it completely ignoring this (MySQL)
SELECT * FROM thread_reports ORDER BY report_datetime DESC, resolved DESC
It's completely ignoring the "resolved" at the end. Even if I change it to this:
SELECT * FROM thread_reports ORDER BY report_datetime, resolved
But if I do this:
SELECT * FROM thread_reports ORDER BY resolved
Then it makes the "resolved" column a factor in how it orders the results.
Soooo what the heck is going on? Why does it ignore resolved except when it's by itself?
The better I get at programming, the more I appreciate arrays. Handy dandy things they are.
because order by clauses are written like:
(column name [ASC|DESC] )*
Actually, the initially posted queries should work--sorting by multiple columns does require that the columns be separated by a comma. My initial reaction to the original question is that you're probably misinterpreting what the sort should do. Can you supply some sample output using a small data set and the "broken" query?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)