。<?PHP
/**
* a class use to connect the MySQL database and do some query
* wayne ,Mar 11, 2002
*/
class dbClass {
var $hostName = "localhost";
var $dbName = "exhibit";
var $Login = "wayne";
var $PassWord = "xiao";
var $conn;
var $result;
function dbClass(){
$this->conn = MySQL_connect("$hostName","$this->Login","$this->PassWord");
MySQL_select_db("$this->dbName", $this->conn);
}
function executeQuery($sql){
$this->result = MySQL_query("$sql",$this->conn);
return $this->result;
}
function closeConn(){
MySQL_close($this->conn);
}
}
?>