You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') order by onclick desc limit 4' at line 1
select id,title,titlepic,titleurl,pic_param from ***_ecms_bookname where classid in() order by onclick desc limit 4