PDO 查询mysql数据库
程序员文章站
2022-06-01 10:14:51
...
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() . "
";
die();
}
上一篇: Visio 2013 自学网 笔记