codeigniter - Calling a method in controller from a model -


is possible call method in controller model?

if ($this->db->trans_status() === true)         {             //calling method in controller         } 

if need that, there's wrong design. controller responsible happens in view (template). model responsible manipulating , retrieving records database.

as general rule, if function going used in more 1 template, put in model. otherwise, goes in controller.

the model should not know controllers. maybe redesign of system more appropriate in case.

here link similar thread.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -