Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getdatatable()
- {
- $draw = intval($this->input->get("draw"));
- $start = intval($this->input->get("start"));
- $length = intval($this->input->get("length"));
- $query = $this->db->query("SELECT c.id as ID,d.name as Name,d.mobile_no as Num,f.title as Title,ct.name as City,c.call_time as Time FROM dairy d INNER JOIN calls c ON c.caller_id=d.id INNER JOIN feedback_type f ON f.id=c.feedback_text INNER JOIN city ct ON ct.id=c.city ORDER BY c.id DESC");
- $data = [];
- foreach($query->result() as $r) {
- $data[] = array(
- $r->ID,
- $r->Name,
- $r->Num,
- $r->Title,
- $r->City,
- $r->Time,
- );
- }
- $result = array(
- "draw" => $draw,
- "recordsTotal" => $query->num_rows(),
- "recordsFiltered" => $query->num_rows(),
- "data" => $data
- );
- return $result;
- }
Add Comment
Please, Sign In to add comment