⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Error on switching databases



Behnam Darky

Behnam Darky
  • profile picture
  • Member

Posted 04 July 2016 - 19:49 PM

Hello.

I did the exact same way about switching database : Topic

But i receive error on set table name.

The table name does not exist. Please check you database and try again. —- #0 E:\XAMPP\htdocs\lead\application\libraries\Grocery_CRUD.php(4441):

My function code:

$this->db = $this->load->database('ipb', TRUE);        

        $this->load->library('Grocery_CRUD.php');
        try{

            $crud = new grocery_CRUD();
            $crud->set_table('ipb_members');
            $crud->columns('member_id','name');
            $crud->edit_fields('member_id');
            $crud->required_fields('member_id');
            $output = $crud->render();
            $this->main->_clan_manage($output);


        }catch(Exception $e){
            show_error($e->getMessage().' —- '.$e->getTraceAsString());
        }

I should notice that i tested the result of change database with CI list_table function and another test query and all worked fine.

 

 

I will be appreciated if you help me.

Thank you.