当前位置:Gxlcms > PHP教程 > yii查询问题

yii查询问题

时间:2021-07-01 10:21:17 帮助过:19人阅读

  $connection = Yii::app()->db;        $table = $connection->tablePrefix.'insurance';        $sql = "select insurance_id, insurance_urlname from $table where insurance_display='Y' and insurance_status='A'";        $command = $connection->createCommand($sql);        $list = $command->execute();


$list 返回的是查询出来的条数

如何返回查询出来的结果集?


回复讨论(解决方案)

execute (执行)
只用于无返回结果的场合

人气教程排行