Tuesday, November 26, 2013

convert string into array and fetch data in codeigniter

// $data = array($studID,false);//('2305283d564dd40a,121645285101422551')
   $data = explode(',',$studID);
   $this->db->select('secureFName,secureLName');
   $this->db->from('adminsecureauth');
   $this->db->where_in('secureUsrID',$data);
   $query = $this->db->get();
   $result = $query->result_array();
   echo $this->db->last_query();
   return $result;