PHP 链接 ACCESS 数据库最简单的方法
类别: PHP & ACCESS教程
<?
$dbc=new com("adodb.connection");
$dbc->open("driver=microsoft access driver (*.mdb);dbq=c:\member.mdb");
$rs=$dbc->execute("select * from tablename");
$i=0;
while (!$rs->eof){
$i+=1
$fld0=$rs->fields["UserName"];
$fld1=$rs->fields["Password"];
...
echo "$fld0->value $fld1->value ....";
$rs->movenext();
}
$rs->close();
?>
$dbc=new com("adodb.connection");
$dbc->open("driver=microsoft access driver (*.mdb);dbq=c:\member.mdb");
$rs=$dbc->execute("select * from tablename");
$i=0;
while (!$rs->eof){
$i+=1
$fld0=$rs->fields["UserName"];
$fld1=$rs->fields["Password"];
...
echo "$fld0->value $fld1->value ....";
$rs->movenext();
}
$rs->close();
?>
- 上一篇: PHP生成静态页面的两种方法
- 下一篇: PHP 中 ' 和 " 谁快?
-= 资 源 教 程 =-
文 章 搜 索