dhope Posted November 29, 2009 Share Posted November 29, 2009 Hi, is it possible to count how many values where logged on a certain date in a database, then arrange them starting with the the most popular day? Thanks in advance. my code, $query = "SELECT *, count(*) FROM statTracker GROUP by date_visited"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { } Link to comment https://forums.phpfreaks.com/topic/183300-count-arrange-by-highest-value/ Share on other sites More sharing options...
Mchl Posted November 29, 2009 Share Posted November 29, 2009 SELECT *, count(*) AS logCount FROM statTracker GROUP by date_visited ORDER BY logCount DESC Link to comment https://forums.phpfreaks.com/topic/183300-count-arrange-by-highest-value/#findComment-967514 Share on other sites More sharing options...
dhope Posted November 29, 2009 Author Share Posted November 29, 2009 Thanks Link to comment https://forums.phpfreaks.com/topic/183300-count-arrange-by-highest-value/#findComment-967537 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.