Welcome Guest, Not a member yet? Register   Sign In
Problem loading database class in custom class
#1

[eluser]prezet[/eluser]
Hi

Here is my code:

Code:
class Cat
{
    
    public function __construct($cat_name)
    {
    $CI = get_instance();
        
    $CI->load->library('database');
    }
}

And I get a 'Unable to load the requested class: database'... any ideas?

Other libraries seem to be ok.
#2

[eluser]Pascal Kriete[/eluser]
The database class has it's own loading call:
Code:
$this->load->database();




Theme © iAndrew 2016 - Forum software by © MyBB