0
Well earlier I posted a problem about the elimination of 1 select which was solved but now I appeared another problem .
My idea is to create a playlist that prioritizes status 1. Whenever a user posts the video it is inserted with status 1. After the video is played, I update it to status 0. The playlist will continue playing videos that have status 0
The problem is that when all videos are status=0 the playlist will always be catching the same video in the case of select below will always get id 7, I’m trying to randomize unsuccessfully.
SELECT * FROM playlist ORDER BY status DESC,id ASC, RAND() LIMIT 1
SELECT * FROM playlist ORDER BY status DESC,RAND() LIMIT 1
– Motta