Quote:
Originally Posted by Jakez
That was their first suggestion, didn't work :/
|
That should have worked. Are you sure the 'views' field is set to an integer type?
Quote:
Originally Posted by Jakez
Even tried: SELECT * FROM `table`, DATE_FORMAT(`time`, '%M %e %Y') as formatTime ORDER BY `formatTime` DESC,`views` DESC
|
This query looks invalid. It should be something more like this:
Code:
SELECT *, DATE_FORMAT(`time`, '%M %e %Y') as `formatTime` FROM `table` ORDER BY `formatTime` DESC, `views` DESC
Quote:
Originally Posted by Jakez
Maybe I could just sort everything by views, and then as it's looping through throw each post into the group which date it belongs to..?
|
I think ultimately you will want to create an array for ease of outputting the data. If you only sort by views, then build the array, you will still need to sort by date (which is much easier to do with mysql).