php读取access数据库
时间:2021-07-01 10:21:17
帮助过:11人阅读
//读取mdb数据库
$conn =
new com("ADODB.Connection"
);
$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".
realpath("../mydata.mdb"
);
$conn->Open(
$connstr);
$rs =
new com("ADODB.RecordSet"
);
$rs->Open("select * from userinfo",
$conn,1,1
);
while(!
$rs->
eof) {
$f =
$rs->Fields(1
);
echo $f->
value;
echo " ".
$rs->Fields(2)->
value;
$rs->
MoveNext();
}
?>
php读取access数据库
标签:echo col nec from userinfo pat ros user ext