Re: Problem extending mysqli - "No database connected"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Lee PHP wrote:
    public static function getInstance($url = null) {
        // Set the URL if one is provided.
        if (isset($url)) {
            $this->setUrl($url);
        }
// Instantiate the Singleton if not already instantiated.
        if(empty(self::$INSTANCE)) {
            self::$INSTANCE = new Database();
        }

        return self::$INSTANCE;
    }

Also, this is a static method so there is no $this available.

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux