Welcome Guest, Not a member yet? Register   Sign In
Database class loading and model names
#1

[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'...
#2

[eluser]InsiteFX[/eluser]
If you need help POST! your code and database.php from config folder.

Enjoy
InsiteFX
#3

[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.
#4

[eluser]InsiteFX[/eluser]
Then try re-installing CodeIgniter, I have seen this happen before and a clean install seems to fix it.

Enjoy
InsiteFX
#5

[eluser]Ahmed Nuaman[/eluser]
Actually, sorry, it was me! I n00bly was getting the CI instance in a model, d'oh...




Theme © iAndrew 2016 - Forum software by © MyBB