I'm trying to figure out the best way to select 10
records randomly from a table for 24 hours
the statement should return the same set for 24 hours
SELECT * FROM tableX LIMIT 10
I think i can use the MMDDYY
as an input for an algorithm that would take 1 input and return the same set of data for that input. and use that in WHERE
or ORDER BY
then each day the select will return different data for the next 24 hours.
for example:
I have a table called news
i want to be able to select 10 Random news
but i don't want the values to change every time the user refresh the page, i want the same news to appear for 24 hours. and next day it will change to another set of random news.