Home > php教程 > php手册 > PHP 链接ACCESS 数据库最简单的方法

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

WBOY
Release: 2016-06-21 08:59:28
Original
1144 people have browsed it

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



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template