Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY tutoring.tutoring_id DESC' at line 1 Error No: 1064 SELECT tutoring.*,ps_user.username FROM tutoring LEFT JOIN ps_user ON tutoring.user_id = ps_user.user_id where ps_user.user_id= ORDER BY tutoring.tutoring_id DESC