PHP - displaying 1 random record for each week
Posted
by mike
on Stack Overflow
See other posts from Stack Overflow
or by mike
Published on 2010-04-26T09:05:48Z
Indexed on
2010/04/26
9:13 UTC
Read the original article
Hit count: 165
I want to display 1 random record from a database based on the week.
I need to determine if it's a new, and if it is a new week, then select the record and display the new record.
I'm thinking I can just use a single day of the week to generate the new record, either way will work.
I'm really having a hard time conceptualizing how I'll store the record id and not select a new one when someone visits again the same day or refreshes the page.
Any ideas? Let me know if I wasn't clear enough.
© Stack Overflow or respective owner