random_list
Differences
This shows you the differences between two versions of the page.
— | random_list [2021/04/12 20:58] (current) – created pinupadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Random Playlist ====== | ||
+ | |||
+ | With the magic of sql active playlist we can make a few random playlists for your needs. | ||
+ | |||
+ | Here are a few activesql playlists that do some randomness. Note you can change the where part to say only certain emulators and limit the # of games to return. | ||
+ | |||
+ | Like following videos?: See this nice video: [[https:// | ||
+ | |||
+ | Basic random list that changes each time you go into/out of playlist. uses all games and limits 10 | ||
+ | < | ||
+ | |||
+ | Select * from Games where visible=1 order by random() limit 10 | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Daily Random Playlist ===== | ||
+ | |||
+ | Lets say you want the same random playlist for day. So random tables will be different each 24 hours. | ||
+ | |||
+ | < | ||
+ | select *, | ||
+ | |||
+ | </ | ||
+ | |||
+ | ===== Weekly Random Playlist ===== | ||
+ | |||
+ | Lets say you want the same random playlist for the week. So random tables will be different each week; | ||
+ | |||
+ | < | ||
+ | select *, | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Monthly Random Playlist ===== | ||
+ | |||
+ | And lastly for a monthly random playlist | ||
+ | |||
+ | < | ||
+ | select *, | ||
+ | |||
+ | </ | ||
+ | |||
+ | if you'd like to filter which emulators then you would need to find the EMUID #. (get that from emulator setup field) | ||
+ | |||
+ | < | ||
+ | Select * from Games where visible=1 AND EmuID in (1,3) order by random() Limit 5 | ||
+ | |||
+ | </ | ||
+ | |||
+ | That will grab random from emulators 1 or 3, and grab 5 tables in total. | ||
+ | |||