Welcome Guest, Not a member yet? Register   Sign In
How to transfer data between model & controller?
#3

[eluser]imanhunter[/eluser]
[quote author="WanWizard" date="1300547361"]You shouldn't load views in your model. Model methods are strictly behind the scenes blocks of code.

Instead, do


So have your model methods return the values they are supposed to retrieve, or FALSE is there is an error. Check the return value in the controller, and base your descisions on that value. Your controller should contain the application flow logic, not the model.[/quote]

Thank WanWizard for that help. CI so far is the easiest to learn but in someway I'm still stuck. Tried other framework but the end, still get back to CI.

It's working now. So I can continue. Should ask in this forum months ago. LOL.

BTW, how can I maintain the data. Can session help?


Messages In This Thread
How to transfer data between model & controller? - by El Forum - 03-19-2011, 03:59 AM
How to transfer data between model & controller? - by El Forum - 03-19-2011, 04:09 AM
How to transfer data between model & controller? - by El Forum - 03-19-2011, 04:34 AM
How to transfer data between model & controller? - by El Forum - 03-19-2011, 04:44 AM
How to transfer data between model & controller? - by El Forum - 03-19-2011, 10:45 AM
How to transfer data between model & controller? - by El Forum - 03-19-2011, 10:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB