no database connection into my custom library - 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: no database connection into my custom library (/showthread.php?tid=43682) |
no database connection into my custom library - El Forum - 07-20-2011 [eluser]Unknown[/eluser] Hii, I have a Little problem with my custom libraries. When i need a database connection in my libraries have i an error. My database connection is auto-loaded. Can any body help my? sorry for my bad English but im dutch. Error: Code: Fatal error: Call to a member function select() on a non-object in /home/deb3052/domains/stijnbourdeaux.com/public_html/dev/application/libraries/auth.php on line 22 My libraries: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); no database connection into my custom library - El Forum - 07-20-2011 [eluser]jmadsen[/eluser] not sure why you get the "select()" error, but Code: $query = $this -> db -> get(); should be Code: $query = $this -> CI -> db -> get(); everything else (except the missing do_hash() function) worked for me |