A Database Error Occurred

Error Number: 1064

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 d.status = 1 AND d.del_flag = 'N' ORDER BY d.priority ASC' at line 4

select * from doctor_list_speciality dl INNER JOIN doctors d ON d.doctorId = dl.doctor_id where dl.speciality_id = AND d.status = 1 AND d.del_flag = 'N' ORDER BY d.priority ASC

Filename: models/Usermodel.php

Line Number: 124