Unsuitable paginated query results after splitting database table into two tables and using join() in Codeigniter
12:41 27 Jan 2011

I had my pagination working, but then I split the one table into two tables. Now I have to join two tables to get the results I once had.

My db script is:

$query = $this->db->select('*');
$query = $this->db->from('user_entry'); 
$query = $this->db->join('user_details', 'user_entry.UserID = user_details.id'); 
$query = $this->db->limit($limit, $offset); 
$query = $this->db->get();

How can I ensure reliably fetched set of results with pagination?

php codeigniter pagination limit query-builder