[ERROR] Pagination initialize() in Codeigniter 2.10 |
[eluser]Fandy[/eluser]
Hy, masters I have problem when i try use Pagination library. I use Codeigniter latest version 2.1.0. And i get following error : A PHP Error was encountered Severity: Notice Message: Undefined property: Action::$pagination Filename: bukutamu/action.php Line Number: 56 ( ! ) Fatal error: Call to a member function initialize() on a non-object in C:\wamp\www\codeigniter\application\controllers\bukutamu\action.php on line 56 Here is my code in Model and Controller Model : bukutamu_model.php Code: .... Controller : bukutamu.php Code: .... Please help me, Thanks before, masters..
[eluser]Stefan Hueg[/eluser]
First of all, here is an optimization: Code: function select_limit($limit = array()) and Code: ... Second, could you enable logging in your config.php, set the log level to 4 and see what your log tells? Whether the pagination class is loaded properly? If so, you should see an entry like "Pagination Class Initialized".
[eluser]Fandy[/eluser]
Hay Stefan, thank you for your fast response. I have changed, but still error. And i enable the logging to level 4, and i get this report. I think pagination already initialized. Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> I attach my code model,view and controller below. SOURCE Thanks for your support, ![]()
[eluser]Stefan Hueg[/eluser]
Could you change the following lines: bukutamu_model.php Code: function select_limit($limit = array()) action.php Code: function view() and try it again? If this even does not work, could you upload your whole project?
[eluser]InsiteFX[/eluser]
total_rows is how many rows in your database table! limit is how many rows you want to return at once! Code: $cnt = $this->db->count_all('table_name'); |
Welcome Guest, Not a member yet? Register Sign In |