Re: Problem extending mysqli - "No database connected"
| From: | Stut | Date: | Fri, 29 Jun 2007 17:56:49 +0000 |
| Subject: | Re: Problem extending mysqli - "No database connected" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-257978@lists.php.net to get a copy of this message | ||
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/