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 `parent_id` =0' at line 3
SELECT `id`, `permission_name` as `text`, `url`, `parent_id`, `img` FROM `i_permission` WHERE `id` IN() AND `parent_id` =0