Welcome Guest, Not a member yet? Register   Sign In
Can you check my pagination?[SOLVED]
#8

I think the problem is in your model. The get_paginas function is returning an array of objects, not arrays.
You can solve this in two different ways.

1. In your view. Instead of array keys, use the object notation, like $result->field_name.

2. In the model. Let the function get_paginas return the records as a set of arrays:

PHP Code:
public function get_paginas($limit$start) {
 
   $this->db->limit($limit$start);
 
   $query $this->db->get("blog");

 
   if ($query->num_rows() > 0) {
 
       return $query->result_array();
 
   }

 
   return false;

Reply


Messages In This Thread
RE: Can you check my pagination? - by Wouter60 - 02-08-2017, 11:48 PM
RE: Can you check my pagination? - by kirasiris - 02-09-2017, 12:53 AM
RE: Can you check my pagination? - by Wouter60 - 02-09-2017, 05:42 AM
RE: Can you check my pagination? - by kirasiris - 02-09-2017, 06:12 AM
RE: Can you check my pagination? - by Wouter60 - 02-09-2017, 08:56 AM
RE: Can you check my pagination? - by kirasiris - 02-09-2017, 06:25 PM
RE: Can you check my pagination? - by Wouter60 - 02-09-2017, 11:40 PM
RE: Can you check my pagination? - by kirasiris - 02-10-2017, 12:50 PM
RE: Can you check my pagination? - by pdthinh - 02-10-2017, 10:01 PM
RE: Can you check my pagination? - by kirasiris - 02-10-2017, 10:46 PM
RE: Can you check my pagination? - by pdthinh - 02-10-2017, 11:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB