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 '&& i.status!=2 ORDER BY i.kurztitel' at line 9
        SELECT
            i.*
        FROM
            inhalt AS i
        INNER JOIN
            get_content AS gc
        ON i.pid = gc.content_id
        WHERE
            gc.page_id =  && i.status!=2
        ORDER BY
            i.kurztitel