APPLY FOR ONLINE Zend Framework Certification

                    
                        Type 1

Limit in Codeigniter usses 

Here is an example using LIMIT.

$this->db->select('*');
$this->db->from('employee');
$this->db->limit(0, 10);
$query = $this->db->get();

// Produces SQL
// SELECT * FROM employee  LIMIT 0, 10;  

Type 2
Here is another way to do limit data
$this->db->select('*');
$this->db->get('employee', 0, 10);

// Produces SQL
// SELECT * FROM employee LIMIT 0, 10;

$result = $this->db->get('employee', 0, 10)->result_array();

// Produces REsult data
                    
                


Comment


Back to Top