Re: [PHP] Problem extending mysqli - "No database connected"
- From: stuttle@xxxxxxxxx (Stut)
- Date: Fri, 29 Jun 2007 18:57:34 +0100
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/
.
- References:
- Problem extending mysqli - "No database connected"
- From: "Lee PHP"
- Problem extending mysqli - "No database connected"
- Prev by Date: Re: [PHP] Problem extending mysqli - "No database connected"
- Next by Date: Re: Problem extending mysqli - "No database connected"
- Previous by thread: Re: [PHP] Problem extending mysqli - "No database connected"
- Next by thread: Re: Problem extending mysqli - "No database connected"
- Index(es):