成都网站建设设计

将想法与焦点和您一起共享

php连接数据库类(后续再加)

query('set names utf8');
if(!$dbh){
    exit('连接数据库失败');
}
$context = $dbh->query("select * from my_test");
$res = $context->fetchAll(PDO::FETCH_ASSOC);
var_dump($res);
$dbh->beginTransaction();
$count = $dbh->exec("delete from `my_test` where my_id<150");
$dbh->rollback();
$dbh->commit();

网页题目:php连接数据库类(后续再加)
URL链接:http://chengdu.cdxwcx.cn/article/gedics.html