close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Increase ID by one every 7 days

Thread began 5/19/2010 10:51 am by John Langer | Last modified 6/21/2010 8:22 am by John Langer | 3578 views | 42 replies

John LangerBeta Tester

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.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...