Welcome Guest, Not a member yet? Register   Sign In
Problem Extending Database Driver
#1

Hi,

Just followed the wiki (https://github.com/bcit-ci/CodeIgniter/w...se-Drivers) and im getting this error:

Quote: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:

PHP Code:
$this->CI->db->where('session_id'$session['session_id']); 

My extended class is just the example from the wiki:

PHP Code:
<?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);
    }



Can anyone help? 

Im using CI 2.x

Thanks
Reply
#2

Hi Guys

Sorry to bump this, but anyone can help me here?

I can't really get my head around this.

Thanks
Reply
#3

The 2.x trunk hasn't been touched in over 5 years at this point, you may not find a lot of people here that still use it (or ever used it for that matter). You might have better luck asking on a site with a larger audience, something like SO for example.
Reply
#4

You can not do it with 2x that link is for doing it to CodeIgniter 3.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB