Database Error; SQL: SELECT DISTINCT t.*,`t2`.`type_of_specimen`,`t2`.`aadhar_num`,`t2`.`test_type` FROM `wp_pods_covid_report_delhi` AS `t` INNER JOIN wp_pods_covid_report_delhi_details t2 on t.id=t2.covid_report_delhi_id WHERE ( t.id = and t.icmr_id is null and t.result !='' ) ORDER BY t.ID ASC, `t`.`name`, `t`.`id` LIMIT 0, 100; Response: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'and t.icmr_id is null and t.result !='' ) ' at line 7