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