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 inv_ct1=2 and inv_ct2=6 ORDER BY inv_nom ASC' at line 1