SELECT*FROMsongsWHEREenabled = 1ANDsong_type = 0ANDid_subcat = 4LIMIT3* ⇔ from all columns.
instead of the *, you can use ID, artist and title, so the list to show will not be so with. (the most important thing is that the ID become obtained, else RadioDJ can't find the track)
songs ⇔ the table name. enabled = 1 ⇔ only enabled tracks. song_type = 0 ⇔ just songs no sweeper or jingle or stations id's. id_subcat = 4 ⇔ In my case 4 is tracks from the subcategory 80s. LIMIT3 ⇔ setting how many tracks to select.
Before the LIMIT 3 (and also before, ORDER BY, GROEP BY, DESC and ASC), you can use the:
The important commands are:
I have copy the line in the rotation from query screen
Clicking on Run Query shows:
You can see in the list there are two ABBA tracks in it.
Come in handy now, there are pre divined by Marius.
Puting in $ForceRepeatRules$ and a bit more what i will explan.
Using the line: SELECT `ID`, `artist`, `title` FROM `songs` WHERE `song_type`=0 AND `enabled`=1 AND $ForceRepeatRules$ ORDER BY `count_played` DESC LIMIT 3;
Splitting it up a bit.
SELECT ID, artist, title
(information from 3 colomns)
WHERE enabled = 1
AND song_type = 0
AND id_subcat =
AND $ForceRepeatRules$ Pre divined to the radiodj settings
ORDER BY `count_played`
Put them in order of times played.
LIMIT 3 Just 3 tracks no more.
All COUNT() prevents double selection of a Artist, Title or Album name.
You can us ASC or DESC to in the line. ASC low to hight, DESC hight to low.
The line looks then as:
SELECT `ID`, `artist`, `title` FROM `songs` WHERE `song_type`=0 AND `enabled`=1 AND $ForceRepeatRules$ ORDER BY `count_played` DESC LIMIT 3;
Clicking on Run Query shows now:
For a start making a query, this explanation will do!