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 ')) ORDER BY sort_order, _name_sort LIMIT 0,12' at line 1
SELECT SQL_CALC_FOUND_ROWS p.*, name_ru AS _name_sort FROM SC_products p WHERE (categoryID IN (586)) AND ( enabled=1 AND ordering_available=1 AND p.categoryID NOT IN ()) ORDER BY sort_order, _name_sort LIMIT 0,12