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 's Claw%' or d.title like '%Claw%' ) group by d.id order by rand(), d.end_time' at line 23