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 ta.num' at line 1: SELECT ta.autorID, a.autorin_vorname, a.autorin_nachname, a.institution FROM titel_autoren AS ta LEFT JOIN authors AS a ON a.autorin_id = ta.autorID WHERE ta.titelID = ORDER BY ta.num