1
Is there any way I can bring Mysql records, where the field (for example) is_new is = 1, but when there are no records with the fields is_new = 1, I want the query to make an ORDER BY Rand(), it is possible?
In practice, every time I make a select, I want to bring in 5 clients, using the order by Rand, but when I have new records (and for that the is_new field of the client table gets 1) I want it to bring in 5 of these last records, so when records are displayed their flag changes to 0 and in the next query, it only comes from Rand
Thank you