Welcome Guest, Not a member yet? Register   Sign In
Having database access in 3rd party lib

Hello, I have a 3trd party lib.
Now I want to use database in that.
How can I do this job?

Look here: http://www.codeigniter.com/userguide3/ge...ur-library

Soo.. for example:

PHP Code:
class extLib3 {
private $ci;

    public function __construct() 
        //Getting CI instance (the =& is important and not a typo, because you want the original, not a copy (assigning by reference))
        $this->ci =& get_instance();

        //Load database

-.-.-.-.-.-.-.-.- Angel -.-.-.-.-.-.-.-.-

Theme © iAndrew 2016 - Forum software by © MyBB