关于数据库连接:设置了几个参数,

private $dbparam=array(
"db_host"=>"localhost",
"db_username"=>"",
"db_password"=>"",
"db_database"=>"",
"db_charset"=>"UTF8",

__construct($params=array())构造函数可以传入参数

function __construct($params=array())
{
    if(is_array($params))
    {
       $this->setParams($params);   
    }
    $this->db=NewADOConnection("mysql");
    $this->db->Connect($this->dbparam["db_host"],$this->dbparam["db_username"], $this->dbparam["db_password"],$this->dbparam["db_database"]);
    $this->db->SetFetchMode(ADODB_FETCH_ASSOC);
    $this->db->Execute("use ".$this->dbparam["db_database"]);    
    $this->db->Execute("set names ".$this->dbparam["db_charset"]);         
}       
返回的记录集形式
define('ADODB_FETCH_DEFAULT',0); 
define('ADODB_FETCH_NUM',1); 
define('ADODB_FETCH_ASSOC',2); 
define('ADODB_FETCH_BOTH',3); 
以上的常量,是在adodb.inc.php里定义的,也就是$ADODB_FETCH_MODE 这个变量可以设置的值
常用的是:ADODB_FETCH_NUM 或 ADODB_FETCH_ASSOC
ADODB_FETCH_NUM 返回的记录集中的索引,是数字形式,即数据库字段的排序顺序值
ADODB_FETCH_ASSOC 返回的记录集中的索引,是原数据库字段名
ADODB_FETCH_BOTH 和 ADODB_FETCH_DEFAULT 是同时返回 ADODB_FETCH_NUM, ADODB_FETCH_ASSOC的值,某些数据库不支持

功能函数

功能函数描述
qstr
getDBVersion
execute
getSqlValue
getone
getrow
getall