PDO query mysql database_PHP tutorial

WBOY
Release: 2016-07-13 17:04:55
Original
948 people have browsed it

PDO query mysql database This article provides an example tutorial of php pdo mysql operation. This is to query mysql data and display it by php pdo

pdo query mysql tutorial database tutorial
This article provides a php tutorial pdo mysql operation example tutorial, which is to query mysql data and display it by php pdo
*/

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();
}

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/630815.htmlTechArticlePDO query mysql database This article provides an example tutorial of php pdo mysql operation, which is php pdo query mysql data and display pdo query mysql tutorial database tutorial this article provides a...
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template