SELECT * FROM page_panels AS p, panels AS a WHERE p.page_id = AND p.panel_id = a.id AND a.panel_area_id = 20 ORDER BY a.position ASC
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND p.panel_id = a.id AND a.panel_area_id = 20 ORDER BY a.position ASC' at line 1