Commit 6a5b0aba by Jansa Jose

search doctors date

parent 9af14a1e
......@@ -1074,7 +1074,9 @@ class Webservice_model extends CI_Model {
if(isset($data['date']) && strlen($data['date'])){
$this->db->join("tbl_doctor_leave","tbl_doctors.id = tbl_doctor_leave.doctor_id and tbl_clinic_doctors.clinic_id = tbl_doctor_leave.clinic_id","LEFT",false);
$date = $data["date"];
$this->db->where("(tbl_doctor_leave.start_date IS NULL or ($date<tbl_doctor_leave.start_date OR $date>tbl_doctor_leave.end_date))");
//$this->db->where("(tbl_doctor_leave.start_date IS NULL or ($date<tbl_doctor_leave.start_date OR $date>tbl_doctor_leave.end_date))");
$new_where = "(select count(*) from tbl_doctor_leave where ($date > tbl_doctor_leave.start_date OR $date < tbl_doctor_leave.end_date)) =". 0;
$this->db->where($new_where);
//$this->db->or_where($or_where);
}
if(isset($data['others']) && strlen($data['others'])){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment