I’m wanting to display random adverts on my front end that are selected from a table. Each advert has a score between 1 and 5. The higher the advert score, the more frequently it should be selected
Is there any way I could achieve this in a query? So maybe something like
SELECT * FROM advert ORDER BY RAND(), (SOME MAGICAL PREFERENCE ORDERING) LIMIT 3
Thanks!
How about