I am making a function that will show what are the articles of the site that are currently being visited, ordered by the number of current visitors. Everytime someone visits an article, it adds his informations to the DB. This is how my BD is made:
First col is IP_Adress, second col is Article_ID, last col is Timestamp.
I need to order my data with which articles currently have the most visitors on it, but my entries are dependent of the IP Adress (because the Ip Adress are unique in the DB, since when a visitor changes page, it only modifies the Article ID & timestamp, it does not create another entry), not of the Article ID.
I am stuck there, hopefuly someone will have an answer for me :).
Thank you!
1 Answer