You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') ORDER BY listorder desc,RAND() DESC )p GROUP BY p.gameid' at line 1
SELECT p.size,p.banben,p.gameid FROM (SELECT size,downurl,xitong,banben,gameid,listorder FROM ***_appgameurl where gameid in () ORDER BY listorder desc,RAND() DESC )p GROUP BY p.gameid