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 p.Mcareer = and p.ID <> 4902 and p.Status = 1 order by p.Dateset desc, p.ID' at line 1