Welcome Guest, Not a member yet? Register   Sign In
Can't select database using extended controller. regular controller works.
#1

[eluser]bill19[/eluser]
Hi everyone,

I am working on a project where I need to connect to 2 DBs. One is called 'default' , and the second 'wo' . I can't select database using an extended controller, however when I extend a regular CI controller my code works!

i.e.

Code:
class Main extends Common_Auth_Controller
-- Does not work

Code:
class Main extends CI_Controller
-- works!

There are no other changes to the code.

In the contructor I am trying to select 'wo' using

Code:
class Main extends Common_Auth_Controller {
//class Main extends CI_Controller {

    function __construct()
    {
        parent::__construct();
        
        
        $this->load->database('wo');
        $this->load->helper('url');

I am not sure if this is some kind of bug. Is there anything I can do to more explicitly select the second db?

Thank you,

Bill



Messages In This Thread
Can't select database using extended controller. regular controller works. - by El Forum - 05-14-2012, 11:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB