当前位置:Gxlcms > PHP教程 > 链接Access数据库_PHP教程

链接Access数据库_PHP教程

时间:2021-07-01 10:21:17 帮助过:5人阅读

//读取mdb数据库例程

$conn = new com("ADODB.Connection");

$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("data/db.mdb");

$conn->Open($connstr);

$rs = new com("ADODB.RecordSet");

$rs->Open("select * from szd_t",$conn,1,1);

while(! $rs->eof) {

$f = $rs->Fields(1);

echo $f->value;

$rs->MoveNext();

}

?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/630921.htmlTechArticle?php //读取mdb数据库例程 $conn = new com(ADODB.Connection); $connstr = DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=. realpath(data/db.mdb); $conn-Open($connstr); $rs = new...

人气教程排行