ordering
Posted: Thu May 05, 2005 6:40 am
sorry if this is a database question, however i am not exactely sure if the solution is in the php or the mysql query itself.
I have a table that stores hits to press releases
ie: (Key | TimeDate | IP Address | Press Release ID)
Now i need to group by (press release id), and then count how many rows share each (press release id), then order the records in a table by the amount of rows in the database table per Press Release,
In other words i want to show the 5 Most popular press releases on the page.
pre-emtive thanks
I have a table that stores hits to press releases
ie: (Key | TimeDate | IP Address | Press Release ID)
Now i need to group by (press release id), and then count how many rows share each (press release id), then order the records in a table by the amount of rows in the database table per Press Release,
In other words i want to show the 5 Most popular press releases on the page.
pre-emtive thanks