ORDER BY RAND() time interval? Weekly? Daily? Custom?
Posted: Tue Nov 20, 2012 7:37 am
My current code is:
[syntax=php]$sql = "SELECT * FROM juarez WHERE categoriesID = 4 ORDER BY RAND() LIMIT 1";[/syntax]
I need to seed the rand value to something that would make it get a new random row EACH hour, each day, and each week.
each sql query goes in different pages. I dont know where to start, can anybody help me please? I want to display a random row in a page in one page, a daily random in another and a weekly random in another. Please help me![Sad :(](./images/smilies/icon_e_sad.gif)
[syntax=php]$sql = "SELECT * FROM juarez WHERE categoriesID = 4 ORDER BY RAND() LIMIT 1";[/syntax]
I need to seed the rand value to something that would make it get a new random row EACH hour, each day, and each week.
each sql query goes in different pages. I dont know where to start, can anybody help me please? I want to display a random row in a page in one page, a daily random in another and a weekly random in another. Please help me
![Sad :(](./images/smilies/icon_e_sad.gif)