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 bnd_id IN (26) AND pd_vizible != 0 AND pd_stoc = 1 AND pd_stoc_mag < 1 ...' at line 3