首页 >后端开发 >php教程 >链接Access数据库_PHP教程

链接Access数据库_PHP教程

WBOY
WBOY原创
2016-07-13 17:03:34871浏览


//读取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...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn