1 $test_data = M(‘hot‘); //实例化数据表 2 $data = $test_data->Distinct(true)->field(‘descriprion‘)->order(‘description desc‘)->select(); //利用distinct方法去重 3 $data = $test_data->group(‘department‘)->order(‘description desc‘)->select(); //利用group方法去重 4 dump($data);
时间: 2024-12-27 19:48:55