blob: 8d0da8d8ca4310521ac759d210fcb2221b9884a6 [file] [log] [blame]
<?
class DBConnection {
#*****************************************************************************
#
# dbconnection.class.php
#
# Author: Denis Roy
# Date: 2004-08-05
#
# Description: Functions and modules related to the MySQL database connection
#
# HISTORY: THIS IS A READ-ONLY DB CONNECTION CLASS!
#
#*****************************************************************************
var $MysqlUrl = "localhost";
var $MysqlUser = "phoenix";
var $MysqlPassword = "fireB!rd";
var $MysqlDatabase = "local_eclipse";
function connect()
{
static $dbh;
$dbh = mysql_connect($this->MysqlUrl, $this->MysqlUser, $this->MysqlPassword);
if (!$dbh) {
echo( "<P>Unable to connect to the database server at this time.</P>" );
}
$DbSelected = mysql_select_db($this->MysqlDatabase, $dbh);
return $dbh;
}
function disconnect() {
mysql_close();
}
}
?>