SQLSTATE[42804]: Datatype mismatch: 7 ERROR: argument of AND must be type boolean, not type integer LINE 1: ...= d3.medicalspecialties_id WHERE d.status = 1 AND d2.id GR... ^