Increase ID by one every 7 days
Is this possible?
I have very simple query
SELECT *
FROM toptenlist
ORDER BY topTenListID ASC
I'm showing this on the page as a list
< ol>
< li>< ?php echo $row_rsTopTenList['1']; ? >
< li>< ?php echo $row_rsTopTenList['2']; ? >
< li>< ?php echo $row_rsTopTenList['3']; ? >
< li>< ?php echo $row_rsTopTenList['4']; ? >
< li>< ?php echo $row_rsTopTenList['5']; ? >
< li>< ?php echo $row_rsTopTenList['6']; ? >
< li>< ?php echo $row_rsTopTenList['7']; ? >
< li>< ?php echo $row_rsTopTenList['8']; ? >
< li>< ?php echo $row_rsTopTenList['9']; ? >
< li>< ?php echo $row_rsTopTenList['10']; ? >
< /ol>
There are about 20 records all with a list of 10 results
The client wants to show the next list (ID1 then ID2 then ID3 etc.) but with an interval of 7 days in between.
So record 1 shows for a week, then record 2... When it gets to 20 (20 is just a figure there may be more there may be less) it goes back to 1 again.
Is this possible either using PHP or SQL?
I haven't a clue myself.
I can just put an extra column in (Yes or No) and have them change it to either show or not but that's a bit cumbersome so if there was an auto solution that would be great. I have searched the web but not found anything. It's difficult to know what to search for.