Welcome Guest, Not a member yet? Register   Sign In
One model uses another methods of model?
#5

[eluser]luffy[/eluser]
[quote author="Ryno in Stereo" date="1259339366"]@jmadsen You need to make a reference to the Code Igniter environment as $this in the context of a model does not refer to the Code Igniter environment, but rather to the current Model instance.

@Luffy I'd actually try to avoid having your models call each other and instead, move this functionality to your controller.

E.g. Your controller action would create the file, get returned an ID of the record created. Then use that ID and create a corresponding setting record.

Make sense?[/quote]

Yeah, it's right Smile, thanks


Messages In This Thread
One model uses another methods of model? - by El Forum - 11-26-2009, 10:19 PM
One model uses another methods of model? - by El Forum - 11-26-2009, 10:56 PM
One model uses another methods of model? - by El Forum - 11-27-2009, 12:07 AM
One model uses another methods of model? - by El Forum - 11-27-2009, 04:29 AM
One model uses another methods of model? - by El Forum - 11-27-2009, 10:13 PM



Theme © iAndrew 2016 - Forum software by © MyBB