Commits

kenjis  committed 6b7d47f

default value of $total_rows in Pagination class should be number. And fix User Guide Pagination Class's Example which uses string to number variable.

  • Participants
  • Parent commits c63dab6

Comments (0)

Files changed (2)

File system/libraries/Pagination.php

 	var $prefix				= ''; // A custom prefix added to the path.
 	var $suffix				= ''; // A custom suffix added to the path.
 
-	var $total_rows			= ''; // Total number of items (database results)
+	var $total_rows			=  0; // Total number of items (database results)
 	var $per_page			= 10; // Max number of items you want shown per page
 	var $num_links			=  2; // Number of "digit" links to show before/after the currently viewed page
 	var $cur_page			=  0; // The current page being viewed

File user_guide/libraries/pagination.html

 <code>
 $this->load->library('pagination');<br /><br />
 $config['base_url'] = 'http://example.com/index.php/test/page/';<br />
-$config['total_rows'] = '200';<br />
-$config['per_page']  = '20';
+$config['total_rows'] = 200;<br />
+$config['per_page']  = 20;
 <br /><br />
 $this->pagination->initialize($config);