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 'AND
s.mapvisible = 1 AND
ss.istonline = 1
' at line 7 SELECT s.arbeitsbezeichnung, ss.menu,
s.mapid
FROM sitemap AS s
LEFT JOIN sitemap_sprache AS ss ON ss.mapid = s.mapid
WHERE s.vorgaenger = AND
s.mapvisible = 1 AND
ss.istonline = 1
ORDER BY s.rang