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 hospital_counselings.no DESC' at line 1
query : SELECT hospital_counselings.no as counseling_no,hospital_counselings.*, hospitals.* FROM hospital_counselings LEFT JOIN hospitals ON hospital_counselings.hospital_no=hospitals.no WHERE hospital_counselings.user_no= ORDER BY hospital_counselings.no DESC