如果是WIN平台,可以用ADO来连,或者是ODBC?
解决方案 »
- 大侠帮看看,数据库提交出问题了,代码贴出了
- 请教 php团队开发 svn问题
- 关于php使用adodb5访问sqlserver2005的问题
- 语法问题:<a class="next" href="'.$page_url.'&page='.$total_page.'">[尾 页]</a>
- 在dreamweaver中连接mysql数据,出现http500错误
- php的strlen函数计算汉字字节数问题?
- 正则求助!麻烦正则下!
- 如何用PHP获得来访者的MAC地址?
- 请问如何拖动多个图片分别提取每个坐标
- 如何实现点击表头信息按表头字段顺序或倒序排序
- 一个简单问题,却好象没有答案??大家都来想想。
- 关于win2000+apache1.3+mysql上,如何解决发邮件的问题
//create the database connection
$conn = new COM("ADODB.Connection");
$dsn = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" . realpath("test.mdb");
$conn->Open($dsn);
//pull the data through SQL string
$rs = $conn->Execute("select name,group from experts");
$clients = $rs->Fields(1);
//start the multicolumn data output
$i = 0;
$columns = 5;
while (!$rs->EOF){
//if $i equals 0, start a row
if($i == 0){
echo "<tr>";
}
//then start writing the cells in the row, increase $i by one, and move to the next record
echo "<td>" . $clients->value . "</td>";
$i++;
$rs->movenext();
//once $i increments to equal $columns, end the row,
//and start the process over by setting $i to 0
if($i == $columns || $rs->EOF) {
echo "</tr>";
$i = 0;
}
}
//end multicolumn data output//close the ADO connections and release resources
$rs->Close();
$conn->Close();
$rs = null;
$conn = null; ?>