代码如下:<?php$dsn = “mysql:host=localhost;dbname=group”;$db = new PDO($dsn, ‘root’, ”);$db->exec(‘set names utf8’); $sql = “select conf_id from `group` group by conf_id”;//$pre = $db->prepare($sql);//$result_arr = array();$pre = $db->query($sql);$result_arr = $pre->fetchAll(PDO::FETCH_ASSOC