1$this->db->select('ae_users.employee_id, ae_users.emp_name, ae_users.emp_name2, ae_users.emp_name3');
2 $this->db->from('ae_users');
3 $this->db->where_in('ae_users.employee_id',$employee_ids);
4
5 $query =$this->db->get();
6
7 if ($query->num_rows()) {
8 return $query->result_array();
9 } else {
10 return 0;
11 }
1// Produces: LIMIT 20, 10 (in MySQL. Other databases have slightly different syntax)
2$this->db->limit(10, 20);
3$this->db->limit(10); // Produces: LIMIT 10
4