Welcome Guest, Not a member yet? Register   Sign In
Critical advice for a CI newbie [sample files included]
#11

[eluser]johnnytoobad[/eluser]
Sorry I'm still not sure what you mean by
Quote:# Your model accepts no paramters, yes it adds an owner.

Can you give me an example of a better method to call the function in the model, I don't think i've quite got my head round it yet.
#12

[eluser]TheFuzzy0ne[/eluser]
That should read "Your model accepts no parameters, yet it adds an owner.".

What I'm getting at, is that your model methods should accept parameters. You can pass the $_POST array if you want, but your model should not access the $_POST array directly. It should simply expect parameters to be passed to it, and act on those parameters. I know it seems like more work, but it's much better practice. This will also allow for more dynamic model methods.




Theme © iAndrew 2016 - Forum software by © MyBB