yii计算数据库的记录条数
$connection=Yii::app()->db; $command = $connection->createCommand(" sql语句 "); $dataReader = $command->query(); $count = $dataReader->rowCount; $renderdoctor = array(); foreach ($dataReader as $row) { $renderdoctor[] = $row; } $count = Report::model()->count();
声明:该文观点仅代表作者本人,牛骨文系教育信息发布平台,牛骨文仅提供信息存储空间服务。