Error Number: 1064

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 tb.is_show=1 AND tb.publish_at<=NOW() AND (ISNULL(tb.offline_at) OR tb.offli' at line 12

SELECT *, (SELECT title FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as title, (SELECT title2 FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as title2, (SELECT description1 FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as description1, (SELECT description2 FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as description2, (SELECT description3 FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as description3, (SELECT description4 FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as description4, (SELECT url_title FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as url_title, (SELECT meta_title FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as meta_title, (SELECT meta_desc FROM ci_doctor_description WHERE language_id=2 and description_id = tb.id) as meta_desc FROM (ci_doctor as tb) WHERE tb.id = AND tb.is_show=1 AND tb.publish_at<=NOW() AND (ISNULL(tb.offline_at) OR tb.offline_at>=NOW()) ORDER BY tb.arrange desc

Filename: /var/www/vhosts/hkiim.cuhk.edu.hk/httpdocs/imc/controllers/team.php

Line Number: 92