$dbc->open("driver=microsoft access driver (*.mdb);dbq=c:\member.mdb");  
$rs=$dbc->execute("select * from tablename")">

PHP 链接ACCESS 数据库最简单的方法

80酷酷网    80kuku.com

  <?  
$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();  
?>













分享到
  • 微信分享
  • 新浪微博
  • QQ好友
  • QQ空间
点击: