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 layout.`status`='online' Order by layout.`line` ASC, layout.`positi' at line 4

Select layout.*, article.`name`, article.`spezifikation`, article.`price_brutto`, article.`picture`, article.`price_from` From `_products_articles_in_layouts` As layout Left Join `_products_articles` As article On layout.`article`=article.`id` Where layout.`layoutid` = AND layout.`status`='online' Order by layout.`line` ASC, layout.`position` ASC