![]() |
Use Library in Model - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: Use Library in Model (/showthread.php?tid=62965) |
Use Library in Model - SajadDP - 09-12-2015 Hello, I'm creating a custom library, like this: PHP Code: <?php PHP Code: <?php If it's wrong please help me to fix it. RE: Use Library in Model - ciadmin - 09-12-2015 See http://www.codeigniter.com/user_guide/general/styleguide.html RE: Use Library in Model - mwhitney - 09-14-2015 Personally, I would rarely use a library to access the database, but there are some rare exceptions (such as building a data access layer). If anything, I might load a model from my library to access the database, though some people would disagree about loading data from the database into a library at all except as arguments to the library's methods. There is not one right way to do almost anything in CodeIgniter, which is one of the reasons for its popularity. |