Pagination limitation?

#1
[eluser]Unknown[/eluser]
I'm new the whole CI bit- about two weeks now, so bear with me. Pagination looks like a great fit for sorting through many results, but i need pagination to sort through results from many tables with different field names retrieved using different queries.

I can get pagination working when i have one simple query from one table, but what would the configs look like (for example how would i get $config['total_rows']) in my controller.

Thanks for any help i can get.

My queries look like this...

#query1
$this->db->like('ProductName', $ProductName);
$this->db->or_like('ProductDesc', $ProductDesc);
$this->db->or_like('BodyHeading1', $BodyHeading1);
$this->db->or_like('Features', $Features);
$this->db->or_like('Benefits', $Benefits);
$this->db->or_like('BodyHeading2', $BodyHeading2);
$this->db->or_like('Body2', $Body2);
$this->db->or_like('BodyHeading3', $BodyHeading3);
$this->db->or_like('Body3', $Body3);
$this->db->orderby('ProductName');
$query1 = $this->db->get('tbl_products', $num, $offset);


#query2
$this->db->like('ProductName', $ProductName);
$this->db->or_like('ProductDesc', $ProductDesc);
$this->db->orderby('ProductName');
$query2 = $this->db->get('tbl_custom_products', $num, $offset);


#query3
$this->db->like('ProductName', $ProductName);
$this->db->or_like('ProductGroup', $ProductGroup);
$this->db->or_like('Body1', $Body1);
$this->db->orderby('ProductName');
$query3 = $this->db->get('tbl_insur_products');

#query4
$this->db->like('PageGroup', $PageGroup);
$this->db->or_like('PageHeading', $PageHeading);
$this->db->or_like('BodyHeading1', $BodyHeading1);
$this->db->or_like('Body1', $Body1);
$this->db->or_like('BodyHeading2', $BodyHeading2);
$this->db->or_like('Body2', $Body2);
$this->db->or_like('BodyHeading3', $BodyHeading3);
$this->db->or_like('Body3', $Body3);
$this->db->orderby('PageGroup');
$query4 = $this->db->get('tbl_general');


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.