PHP操作 ACCSEE 数据库
2008-10-10 16:52
<?php
// PHP 链接 ACCSEE 数据库的方法和操作 例子
$ThisMDB='##SaiTaoComDataFile.mdb';
$conn = new com("ADODB.Connection");
$connstr = "Provider = Microsoft.Jet.OLEDB.4.0;Data Source =".realpath($ThisMDB);
$conn->Open($connstr);
$rs = new com("ADODB.RecordSet");
//$rs->Open("select top 10 * from data where [date]>#2003-03-11#",$conn,1,1);
$rs->Open("Select * from [SaiTao_Admin]",$conn,1,1);
while(!($rs->Eof || $rs->Bof)){
echo '用户名:'.$rs["AdminName"].'|密码:'.$rs["AdminPass"].'|姓名:'.$rs["Names"];
echo '<br>';
// $f = $rs->Fields(1);
// echo $f->value.'<br>';
//echo $rs->Fields["content"]->value."<br>";
//echo $d." ".$rs->Fields["date"]->type.":".$rs->Fields["date"]->value.date("Y-m-d H:i:s",$rs->Fields["date"]->value)."<br>";
$rs->MoveNext();
}
?>