Commit d4f81b31 by Jansa Jose

search

parent a2d5cc1c
...@@ -62,26 +62,26 @@ function filteredData(){ ...@@ -62,26 +62,26 @@ function filteredData(){
$dd = array(); $dd = array();
$dd[0] = array( $dd[0] = array(
"others_id" => 1, "others_id" => 1,
"others_name" =>"DOMICILIARY ATTENDANCE" "others_name" =>"ATENDIMENTO DOMICILIAR"
); );
$dd[1] = array( $dd[1] = array(
"others_id" => 2, "others_id" => 2,
"others_name" =>"MOST WELL ASSESSED" "others_name" =>"MAIS BEM AVALIADO"
); );
$dd[2] = array( $dd[2] = array(
"others_id" => 3, "others_id" => 3,
"others_name" =>"LOWER VALUE" "others_name" =>"VALOR INFERIOR"
); );
$dd[3] = array( $dd[3] = array(
"others_id" => 4, "others_id" => 4,
"others_name" =>"MEN" "others_name" =>"HOMENS"
); );
$dd[4] = array( $dd[4] = array(
"others_id" => 5, "others_id" => 5,
"others_name" =>"WOMEN" "others_name" =>"MULHERES"
); );
return $dd; return $dd;
......
...@@ -1445,23 +1445,23 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1445,23 +1445,23 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
// //$this->db->or_where($or_where); // //$this->db->or_where($or_where);
// } // }
if(isset($data['others']) && strlen($data['others'])){ if(isset($data['others']) && strlen($data['others'])){
if($data['others'] == 'MEN' || $data['others'] == 'WOMEN'){ if($data['others'] == 'HOMENS' || $data['others'] == 'MULHERES'){
if($data['others'] == 'MEN'){ if($data['others'] == 'HOMENS'){
$data['others'] = 'MALE'; $data['others'] = '0';
} }
if($data['others'] == 'WOMEN'){ if($data['others'] == 'MULHERES'){
$data['others'] = 'FEMALE'; $data['others'] = '1';
} }
$others = $data['others']; $others = $data['others'];
$where = 'tbl_doctors.gender ='. "'$others'"; $where = 'tbl_doctors.gender ='. "'$others'";
$this->db->where($where); $this->db->where($where);
} }
if($data['others'] == 'LOWER VALUE'){ if($data['others'] == 'VALOR INFERIOR'){
$where = 'tbl_doctors.price'; $where = 'tbl_doctors.price';
$this->db->order_by($where,'asc'); $this->db->order_by($where,'asc');
} }
if($data['others'] == 'MOST WELL ASSESSED'){ if($data['others'] == 'MAIS BEM AVALIADO'){
$inner_query = $this->db->query("SELECT doctor_id,COUNT(doctor_id) AS count FROM tbl_review GROUP BY doctor_id HAVING COUNT(doctor_id) = (SELECT MAX(mycount) AS count FROM (SELECT COUNT(doctor_id) AS mycount,doctor_id FROM tbl_review GROUP BY doctor_id) AS c)"); $inner_query = $this->db->query("SELECT doctor_id,COUNT(doctor_id) AS count FROM tbl_review GROUP BY doctor_id HAVING COUNT(doctor_id) = (SELECT MAX(mycount) AS count FROM (SELECT COUNT(doctor_id) AS mycount,doctor_id FROM tbl_review GROUP BY doctor_id) AS c)");
if($inner_query->num_rows() > 0){ if($inner_query->num_rows() > 0){
...@@ -1471,7 +1471,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender=' ...@@ -1471,7 +1471,7 @@ CASE when tbl_registration.gender='0' then 'MALE' when tbl_registration.gender='
$this->db->where($where); $this->db->where($where);
} }
} }
if($data['others'] == 'DOMICILIARY ATTENDANCE'){ if($data['others'] == 'ATENDIMENTO DOMICILIAR'){
$where = "tbl_doctors.domiciliary_status =". 1; $where = "tbl_doctors.domiciliary_status =". 1;
$this->db->where($where); $this->db->where($where);
......
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