CodeIgniter Forums
Loading Table Class In a View and Checking Errors - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Loading Table Class In a View and Checking Errors (/showthread.php?tid=30661)



Loading Table Class In a View and Checking Errors - El Forum - 05-21-2010

[eluser]Unknown[/eluser]
Hello. I'm new to Codeignitor and have what it probably a noob question.

Is it possible to load the table class, or any class, into a view?

I tried:

$this->load->library('table');

in a view and it did not work. When I used this in the controller, there weren't any problems.

Also, I tried checking error logs, both Apache and Codeignitor PHP logs, but nothing was showing up indicating that the was a problem with doing this.

Thanks for any help.


Loading Table Class In a View and Checking Errors - El Forum - 05-21-2010

[eluser]mi6crazyheart[/eluser]
According to MVC approach view is not the right place for loading any library. Codeigniter strictly follow this MVC approach. Due to this codeigniter doesn't allow to load any library in VIEW part. VIEW is the place which is only for end user presentation. So, if u need to do any back end business logic type of work then do that in controller.