⚠ 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

use another database that is not the same as the config database.php ?



muonshirata
  • profile picture
  • Member

Posted 20 March 2012 - 09:19 AM

Can I use another database to my grocery crud?

$this->crud->set_table(' database1.tabel1 ');
$output = $this->crud->render();

And CI give error like this.
"The table name does not exist. Please check you database and try again."

I checked the database and tables that actually exist.

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 20 March 2012 - 19:51 PM

Before the:

$this->crud->set_table(' table1');

Just add this line:

$this->db = $this->load->database('database1',true);