Is it bad to use a model directly from a view in codeigniter?

Posted by jason on Stack Overflow See other posts from Stack Overflow or by jason
Published on 2010-06-06T05:18:32Z Indexed on 2010/06/06 5:22 UTC
Read the original article Hit count: 286

Filed under:
|
|

I know normally the data is passed thru to the view with the controller. however, currently in my view I load my model ($this->load->model('Db_model');) so i can use it in a loop to retrieve a users profile picture path from a array of IDs that is passed from controller. Will loading the db model in the view to accomplish this make my site more vulnerable or bad form? To me it seems to be outside of MVC concept but its working atm. thanks

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about views