MY_MODEL |
[eluser]TunaMaxx[/eluser]
For Jamie's MY_Model, you are supposed to name your model with the singular version of the table name, and the table name should be plural. That way, you generally don't have to explicitly set the $_table property. Also, there is no need to call parent::__construct or even have a __construct() method at all in most cases. So your entire 'Things' model could be just a one liner if the MY_Model methods cover your needs: Code: <?php class Thing extends MY_Model {} ...and then to use it: Code: $this->load->model('thing'); |
Messages In This Thread |
MY_MODEL - by El Forum - 11-26-2012, 12:16 PM
MY_MODEL - by El Forum - 11-26-2012, 12:33 PM
MY_MODEL - by El Forum - 11-26-2012, 12:47 PM
MY_MODEL - by El Forum - 11-26-2012, 02:03 PM
MY_MODEL - by El Forum - 11-26-2012, 02:13 PM
MY_MODEL - by El Forum - 11-26-2012, 04:52 PM
|