CI2 - multiple database bug |
[eluser]ripken204[/eluser]
This person is having the same issue as me, so read it as well: http://www.phpfreaks.com/forums/applicat...deigniter/ I am trying to connect to databases in the constructor of models. My two models are below. The Account class you will notice has print_r($this->DB2) right before I perform the query, this shows the correct information. The odd thing is that it throws the error Quote:Table 'teams2010.accounts' doesn't exist This is the database name for my Teams class, im not sure how it even knows about that, especially since the line before where i print out the DB info, it says the database is the Users database. In my controller, if i dont load the Teams model, it works fine. If i load only my Teams model and not my Account model, it works fine. So obviously something is messed up here, I am not sure what could be wrong with my code.. It's as if CI2 does not use the information that is in my database resource, but instead is using the last connected database's information. This is for accessing user accounts Code: class Account extends CI_Model { This does nothing yet Code: class Teams extends CI_Model { |
Messages In This Thread |
CI2 - multiple database bug - by El Forum - 02-05-2011, 01:36 PM
CI2 - multiple database bug - by El Forum - 02-05-2011, 01:51 PM
CI2 - multiple database bug - by El Forum - 02-06-2011, 09:41 AM
CI2 - multiple database bug - by El Forum - 02-06-2011, 11:51 AM
CI2 - multiple database bug - by El Forum - 02-06-2011, 11:53 AM
CI2 - multiple database bug - by El Forum - 05-30-2011, 11:15 AM
|