Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] call MODEL functions in the VIEW, really bad idea?
#5

[eluser]basementDUDE[/eluser]
[quote author="Maglok" date="1250086112"]They let you because it's a best practice to not do it. That means it is up to you to honour the idea.

How would writing the 'complex sql queries' in the Controller and passing it to the View be harder? Smile[/quote]


I need to join 24 tables to show some data which is very hard for me to get it right.
Therefore, instead of writing a big sql query in the moduel, I discover that I could writing some small model functions and call them in the view to do the same thing(I could not pass whole bunch result set though the controller, the foreach loop in the view will mass things up).

My only concern is that the author of CI could set more restrict rule in the future update to break my code.


Messages In This Thread
[SOLVED] call MODEL functions in the VIEW, really bad idea? - by El Forum - 08-12-2009, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB