+ 6
Random Music Playlist from DB
If you can advise some alternative options for creating a random playlist from a database of different musicvideos please feel free to let me know... I thought PHP with mysql would be the easiest way but whats your opinion or ideas ?
1 Respuesta
+ 6
Hello, jackisback !
SELECT * FROM `table` ORDER BY RAND ()
Such a query will pull all the records from the table and mix them randomly. In practice, this is rarely needed. Much more often it is necessary to output exactly a certain number of records:
SELECT * FROM `table` ORDER BY RAND () LIMIT 5
And this query already has a practical advantage, because it allows you to output 5 random records.
In this way, you can output music from your playlist