Re: [PHP] Problem extending mysqli - "No database connected"
- From: stuttle@xxxxxxxxx (Stut)
- Date: Fri, 29 Jun 2007 18:56:49 +0100
Lee PHP wrote:
I have a class that extends msyqli that AFAIK can connect to the
database, but gives me an error when I try and query it. Here's my
class:
-- BEGIN DATABASE CLASS --
require_once('Configuration.php');
require_once('RSFSException.php');
class Database extends mysqli {
private $strUrl = "DEV";
private $strUser;
private $strPass;
private $strHost;
private $intPort;
private $strName;
private static $INSTANCE;
private static $CONFIG;
private function __construct() {
$this->CONFIG = Configuration::getInstance();
$this->establishConnectionSettings();
$this->connect($this->getHost(), $this->getUser(),
$this->getPass(), $this->getName);
I'm assuming $this->getName should have () on the end.
This is probably why it's failing. It's connecting ok, but not selecting a database.
-Stut
--
http://stut.net/
.
- References:
- Problem extending mysqli - "No database connected"
- From: "Lee PHP"
- Problem extending mysqli - "No database connected"
- Prev by Date: Problem extending mysqli - "No database connected"
- Next by Date: Re: [PHP] Problem extending mysqli - "No database connected"
- Previous by thread: Problem extending mysqli - "No database connected"
- Next by thread: Re: [PHP] Problem extending mysqli - "No database connected"
- Index(es):
Relevant Pages
|