Home >Backend Development >PHP Tutorial >Linking Access Database_PHP Tutorial

Linking Access Database_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:03:34872browse


//读取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...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn