Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class DbConnection
- {
- var $hostname = "";
- var $username = "";
- var $password = "";
- var $dbname = "";
- var $dbtype = "";
- var $conn = "";
- function __construct($dbConnParams)
- {
- $this->$hostname = $dbConnParams['host'];
- $this->$username = $dbConnParams['user'];
- $this->$password = $dbConnParams['pass'];
- $this->$dbname = $dbConnParams['dbname'];
- $this->$dbtype = $dbConnParams['dbtype'];
- }
- function connect()
- {
- $this->$conn = mysql_connect($hostname, $username, $password);
- mysql_select_db($database, $conn);
- }
- function disconnect()
- {
- mysql_close($this->$conn);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement