php - I want to write that sql query in codeigneter -
select count(`idcall`) answercount `call` `idemployee`=20 , `c_date`= '2015-04-22' , `c_ansornot`='not answer' select count(`idcall`) answercount `call` `idemployee`=20 , `c_date`= '2015-04-22' , `c_ansornot`='rejected' select count(`idcall`) answercount `call` `idemployee`=20 , `c_date`= '2015-04-22' , `c_ansornot`='answer' select count(`idcall`) answercount `call` `idemployee`=20 , `c_date`= '2015-04-22' , `c_ansornot`='not reachable'
i want write sql query in codeigneter.
any highly appreciated.
please try :
select count(idcall)as answercount call idemployee = 20 , c_date = '2015-04-22' , c_ansornot = 'not answer' $result_na = $this->db->get_where('call',array('idemployee' => 20, 'c_date' => '2015-04-22', 'c_ansornot' => 'not answer'))->num_rows(); select count(idcall)as answercount call idemployee = 20 , c_date = '2015-04-22' , c_ansornot = 'rejected' $result_r = $this->db->get_where('call',array('idemployee' => 20, 'c_date' => '2015-04-22', 'c_ansornot' => 'rejected'))->num_rows(); select count(idcall)as answercount call idemployee = 20 , c_date = '2015-04-22' , c_ansornot = 'answer' $result_a = $this->db->get_where('call',array('idemployee' => 20, 'c_date' => '2015-04-22', 'c_ansornot' => 'answer'))->num_rows(); select count(idcall)as answercount call idemployee = 20 , c_date = '2015-04-22' , c_ansornot = 'not reachable' $result_nr = $this->db->get_where('call',array('idemployee' => 20, 'c_date' => '2015-04-22', 'c_ansornot' => 'not reachable'))->num_rows();
Comments
Post a Comment