Jump to content

most viewed this week, not most viewed of all time


dachshund

Recommended Posts

hi,

 

at the moment I have this code

 

$sql = "UPDATE features SET views=views+1 WHERE id='$id'";
    	mysql_query($sql) or die (mysql_error());

 

to add 1 to the views each time someone goes on the page.

 

I use this to have a 'most viewed' side panel, but obviously this is just the most viewed of all time.

 

is there any way to change this so that it's most viewed this week/past 7 days?

 

any help would be very useful.

 

thanks

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.