SELECT id, live, show_captions, type, curve, contain_narrow, align, bg_color, heading, body, body2, button, button_label, button_url, button_color, num_cols, num_show, num_archive, response_text, email_recipient, cats, embed, sort, formid FROM sections WHERE pageid = AND active = 1 ORDER BY sort 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 active = 1 ORDER BY sort ASC' at line 28