PDO 查詢mysql數據庫 本文章提供一款由php pdo mysql操作實例教程了,這是由php pdo查詢mysql數據並顯示
pdo 查詢mysql教程數據庫教程
本文章提供一款由php教程 pdo mysql操作實例教程了,這是由php pdo查詢mysql數據並顯示
*/
try {
$dbh = new pdo($beidou_connstr,$beidou_user,$beidou_pass);
foreach ($dbh->query('select count(*) as count1, count(*) as count2 from bd_reve.user_day') as $row) {
print_r($row);
}
$dbh = null;
} catch (pdoexception $e) {
print "error!: " . $e->getmessage() . "<br/>";
die();
}