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 '}.`k_students_new` K INNER JOIN {KURS_DB}.`k_students_admin` KA ON KA.s_id =' at line 9