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 'Amico, Guido Alfredo%' AND (tbl_6.cmp_12 = '1' OR tbl_6.cmp_12 = '3') AND tbl...' at line 5