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 'desc limit 0,12' at line 1
select v.*from videos v where cat_id=55 and v.locked='no' and v.practice_id='300' and v.locked='no' group by v.id desc limit 0,12