SELECT SQL_CALC_FOUND_ROWS v.* FROM video_video v WHERE v.State=2 AND v.Id_Category= ORDER BY v.`Date` DESC LIMIT 0, 13 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 v.`Date` DESC LIMIT 0, 13' at line 1