Switching databases in code igniter?

$this->pew = $this->load->database('pew', TRUE) You load a database which doesn't exist in your database-configuration.

$this->pew = $this->load->database('pew', TRUE); You load a database which doesn't exist in your database-configuration.

I used two different names above when I pasted the question, whoops, fixed. – deadbabykitten Jul 11 at 18:04 What does var_dump($this->pew); say? – Claudio Albertin Jul 11 at 20:27 bool(false)... so it's not connecting?.... any thoughts?

– deadbabykitten Jul 11 at 23:29 For some reason, CI doesn't returns a database object. Maybe it can't connect or the group doesn't exist in the config file (maybe a typo). No error message?

Nothing in the logs? – Claudio Albertin Jul 11 at 8:46 php_error. Log - 11-Jul-2011 10:29:54 PHP Fatal error: Call to a member function query() on a non-object in /Sites/CI/nyan/application/models/pewpewmodel.

Php on line 15 If I switch the name of the database group from pew to nyan (which it loads by default) the connection returns true and can connect to the DB no problem – deadbabykitten Jul 11 at 15:37.

I was getting a 500 error when I passed TRUE to connect like below. I assumed (yeah I know) that I was just having the same problem with connecting. Truth be told it was an ID10T error from the beginning.

I was missing the mssql. So library on my local machine and another I was testing from. $this->pew =& $this->load->database('pew', TRUE) My apologies for the waste of time gents.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions