Database class loading and model names |
[eluser]Ahmed Nuaman[/eluser]
I don't know whether this is just me, but unless I load the database through auto load, it tries to find the active group according the the name of the controller. For example, current url is: http://site/member and the database class gets the var 'param' as 'member'. Even if I try to pass 'default', it's still 'member'...
[eluser]InsiteFX[/eluser]
If you need help POST! your code and database.php from config folder. Enjoy InsiteFX
[eluser]Ahmed Nuaman[/eluser]
Hmm, it's not really a "post code and get fixed issue" and the code in the database.php file is fine. The issue seems to stem from the loader. Like I said, for some reason, when calling $this->load->database() (whether it be $CI->load->database()), it seems to load the active record of that controller.
[eluser]InsiteFX[/eluser]
Then try re-installing CodeIgniter, I have seen this happen before and a clean install seems to fix it. Enjoy InsiteFX
[eluser]Ahmed Nuaman[/eluser]
Actually, sorry, it was me! I n00bly was getting the CI instance in a model, d'oh... |
Welcome Guest, Not a member yet? Register Sign In |