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://csdahua.cn/article/gedics.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流