Welcome Guest, Not a member yet? Register   Sign In
Database object not available to Model(s)
#11

[eluser]Aken[/eluser]
Did you add a var anywhere called $db ?

I'm guessing either you aren't loading it properly, or your system modifications are messing with the way the database gets assigned to a variable.
#12

[eluser]conord[/eluser]
As far as I can tell, this isn't the case. This project is still in the beginning stages, so there isn't a ton of files to go through.
#13

[eluser]InsiteFX[/eluser]
Did you save MY_Model in the core with the capitalization like this?
#14

[eluser]conord[/eluser]
Yep.

So I gather from these replies that my model(s) should have access to the full CI instance in $this - if called directly from a controller, correct? So if $this->db was auto-loaded, it should be available to MY_Model and to everything that extends it.

That's the way I'd understand it to work and how all the examples I've looked at so far show.




Theme © iAndrew 2016 - Forum software by © MyBB