View Single Post
Old 04-30-2009, 04:06 PM  
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
PHP/MySQL question: how do you sort posts by date AND views?

Ok I asked this at a coding forum this time before coming here but it seems to have left them stumped

I have a table with a 'time' field which is a timestamp, and lets just say 2 other fields 'views' and 'title'.

I want to sort the posts into dates, and then sort each dates posts by views, example below:

Quote:
April 29th
5430 views - News headline
3300 views - Another News headline
2300 views - Yet Another News headline

April 28th
6630 views - News headline
3200 views - Another News headline
1060 views - Yet Another News headline
I'm sure it can't be that hard.. maybe a simple query and some arrays idk.
__________________
[email protected] - jakezdumb - 573689400

Killuminati

Last edited by Jakez; 04-30-2009 at 04:08 PM..
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote