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 'WHERE a.parent_id = 0 AND page_status = 1 ORDER BY a.page_order' at line 3