That's exactly what I did.
Code:
AND Cha.SortOrder BETWEEN 1 AND 30
the second place looks slightly different but I guess its because it connects to different database (??):
Code:
$sqlquerychannels="SELECT TOP 30 idChannel, [name] from dbo.Channel WHERE isRadio=0 ORDER BY SortOrder";
I am not at home now, but maybe I should try and change the second line to what you have.