note 84751 modified in class.pdo by danbrown
| From: | danbrown@php.net | Date: | Mon, 28 Jul 2008 17:04:28 +0000 |
| Subject: | note 84751 modified in class.pdo by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142863@lists.php.net to get a copy of this message | ||
<?php
class PDOConfig extends PDO {
private $engine;
private $host;
private $database;
private $user;
private $pass;
public function __construct(){
$this->engine = 'mysql';
$this->host = 'localhost';
$this->database = '';
$this->user = 'root';
$this->pass = '';
$dns = $this->engine.':dbname='.$this->database.";host=".$this->host;
parent::__construct( $dns, $this->user, $this->pass );
}
}
?>
--was--
class PDOConfig extends PDO {
private $engine;
private $host;
private $database;
private $user;
private $pass;
public function __construct(){
$this->engine = 'mysql';
$this->host = 'localhost';
$this->database = '';
$this->user = 'root';
$this->pass = '';
$dns = $this->engine.':dbname='.$this->database.";host=".$this->host;
parent::__construct( $dns, $this->user, $this->pass );
}
}
http://php.net/manual/en/class.pdo.php