php入门mysql分页dbClass类_MySQL
程序员文章站
2022-06-11 12:01:46
...
。/**
* 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;
* 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);
}
}
?>
上一篇: 《MySQL性能调优与架构设计》推荐序-From 石展
下一篇: 网络爬虫的原理