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

[eluser]kptengco[/eluser]
Code:
$DB1 = $this->load->database('default', TRUE);
        $DB2 = $this->load->database('wo', TRUE);

public function listings()
    {
        
        var_dump($this->the_user);
        echo 'in home listing';
        echo "<pre>";
print_r($this->db->list_tables());

echo "<pre>";
print_r($this->DB2);
Change
Code:
print_r($this->db->list_tables());
to
Code:
echo print_r($DB1->list_tables()); or  echo print_r($DB2->list_tables());

You don't have to use
Code:
$this->db->
since you load a database and pass it to a variable by that you'll have to replace
Code:
$this->db->
to your variable
Code:
$DB1->get('table');


Messages In This Thread
Can't select database using extended controller. regular controller works. - by El Forum - 05-16-2012, 07:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB