前提是要在這裡:
http://sourceforge.net/project/showfiles.php?group_id=42718&package_id=220409&release_id=649609復制代碼 代碼如下:
<?php
include("adodb/adodb.inc.php"); //包含adodb類庫文件
$conn = NewADOConnection('mysql'); //創建數據庫連接對象
$conn -> debug =true;
$conn -> Connect('localhost', 'root', '1981427','test' ); //連接數據庫
$rs=$conn->execute ("select *from tablename1");
print_r($rs->GetRows());
?>