Im using Codeigniter 2.x and been trying to extend the database class and followed the wiki but im getting this error:
Fatal error: Uncaught Error: Call to undefined method MY_DB_mysqli_driver::where() in /system/libraries/Session.php on line 218
Error: Call to undefined method MY_DB_mysqli_driver::where() in /system/libraries/Session.php on line 218
On line 218 of /system/libraries/Session.php:
$this->CI->db->where('session_id', $session['session_id']);
My extended class is just the example from the wiki:
<?php
class MY_DB_mysqli_driver extends CI_DB_mysqli_driver
{
public function __construct($params)
{
parent::__construct($params);
log_message('debug', 'Extended DB driver class instantiated!');
}
public function get_first($table)
{
return $this->limit(1)->get($table);
}
}
from Codeigniter: problem extending Database Driver
No comments:
Post a Comment