Anfrage fehlgeschlagen: 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 '' at line 29 (SELECT s.stellen_id AS stellen_id, s.stellen_taetigkeit AS stellen_taetigkeit, s.stellen_freieverfuegung AS stellen_freieverfuegung, s.stellen_qualifikation AS stellen_qualifikation, s.stellen_ort AS ort, s.stellen_arbeitszeit AS arbeitszeit, s.stellen_stamp AS stellen_stamp, s.stellen_cat_id AS stellen_cat_id, s.stellen_anzahl AS stellen_anzahl, s.stellen_auslauf AS stellen_auslauf, s.stellen_email AS stellen_email, LOWER(c.stellen_cat_name_kurz) AS cat_name, u.user_id AS user_id, CONCAT(u.user_anrede, ' ', u.user_vorname, ' ', u.user_nachname) AS username, u.user_anrede AS user_anrede, IF(s.stellen_email != '', s.stellen_email, IF(u.user_stellen_email != '', u.user_stellen_email, u.user_email)) AS email, u.user_gesperrt AS user_gesperrt, u.group_id AS group_id, IF(n.nl_id != u.nl_id, n.nl_id, un.nl_id) AS nlid, IF(n.nl_id != u.nl_id, n.nl_name, un.nl_name) AS nlname, IF(n.nl_id != u.nl_id, CONCAT(n.nl_strasse, ' ', n.nl_hausnr), CONCAT(un.nl_strasse, ' ', un.nl_hausnr)) AS nladresse, IF(n.nl_id != u.nl_id, CONCAT(n.nl_plz, ' ', n.nl_ort), CONCAT(un.nl_plz, ' ', un.nl_ort)) AS nlort, IF(n.nl_id != u.nl_id, CONCAT(n.nl_telefon, '-', 0), CONCAT(un.nl_telefon, '-', u.user_dw)) AS telefon FROM intern.kp_stellen AS s JOIN intern.kp_stellen_cat AS c ON c.stellen_cat_id = s.stellen_cat_id LEFT JOIN intern.kp_user AS u ON u.user_id = s.user_id LEFT JOIN intern.kp_nl AS n ON n.nl_id = s.nl_id LEFT JOIN intern.kp_nl AS un ON un.nl_id = u.nl_id WHERE s.stellen_id = )