Welcome Guest, Not a member yet? Register   Sign In
$this->load->database(); doesn't work in models
#8

[eluser]Aken[/eluser]
The __get() method is called when you try to access a class property that doesn't exist. Since you declared it in your CI_Model file, it exists, so __get() is never called, and the CI super object is never accessed.

The second tutorial will not work for models (at least I doubt it will). That's the problem with using magic methods and such.

Ideally, there should be configurable plugins for defining functions and such for IDE's. That's what I use with Coda on the Mac, and seems to make the most sense when it comes to updating them. Maybe Eclipse has something similar.


Messages In This Thread
$this->load->database(); doesn't work in models - by El Forum - 09-05-2012, 05:03 AM
$this->load->database(); doesn't work in models - by El Forum - 09-05-2012, 01:23 PM
$this->load->database(); doesn't work in models - by El Forum - 09-05-2012, 01:56 PM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 12:48 AM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 01:12 AM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 01:15 AM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 01:25 AM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 01:34 AM
$this->load->database(); doesn't work in models - by El Forum - 09-06-2012, 01:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB