![]() |
Use database connection in a helper - 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: Use database connection in a helper (/showthread.php?tid=14650) |
Use database connection in a helper - El Forum - 01-10-2009 [eluser]Unknown[/eluser] Hello everyone, I'm relatively new to CodeIgniter, and I must say I love it. 1 problem. I want to use a database connection and a query in a helper. How do I do this ? Thanks a lot Use database connection in a helper - El Forum - 01-10-2009 [eluser]bitist[/eluser] Here is an example how can you count all users. Code: $CI =& get_instance(); Use database connection in a helper - El Forum - 01-11-2009 [eluser]Unknown[/eluser] Thanks! I thought I've read this somewhere, but I didn't remember where that was ![]() |