Hello
I want to order my db results randomly between three categories, so everything in category one will always appear above category two, etc.
Here is the code I have, which is working fine:
$query = "SELECT car, model FROM (SELECT * FROM cars ORDER BY RAND()) AS t ORDER BY orderno DESC";
where orderno is the field containing the category numbers 1, 2, or 3. However, I have pagination, so I only want the randomness to be changed daily. How can I add a fixed number, like day of the month, to make sure the ordering is only updated once a day?
Many thanks for any suggestions!