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=4 and inv_ct2=50 ORDER BY inv_nom ASC' at line 1