重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
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();