Home > php教程 > php手册 > PDO 查询mysql数据库

PDO 查询mysql数据库

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 10:08:07
Original
1102 people have browsed it

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();
}
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Database pdo connection problem
From 1970-01-01 08:00:00
0
0
0
pdo installation
From 1970-01-01 08:00:00
0
0
0
$pdo->exec($sql);Why does it always return false?
From 1970-01-01 08:00:00
0
0
0
PHP PDO predefined constants
From 1970-01-01 08:00:00
0
0
0
PDO query data error
From 1970-01-01 08:00:00
0
0
0
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template