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 date_submitted' at line 1select category,title_hindi from categories,books where categoryid= order by date_submitted