Re: [PHP] Problem extending mysqli - "No database connected"



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/
.