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 'or t1.employer_id = ) and t1.paypal_status='paid' and t1.job_cancelled = 0 and' at line 1