PHP链接ACCESS数据库最简单的方法
2005-04-17 16:18:44 来源:WEB开发网核心提示:<? $dbc=new com("adodb.connection"); $dbc->open("driver=microsoft access driver (*.mdb);dbq=c:\member.mdb"); $rs=$dbc->execute(&
<?
$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"];
$fld0=$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"];
$fld0=$rs->fields["PassWord"];
....
echo "$fld0->value $fld1->value ....";
$rs->movenext();
}
$rs->close();
?>
更多精彩
赞助商链接