Yii model to array?

前端 未结 14 2010
南笙
南笙 2020-12-08 19:32

How can I convert the result of Trips::model()->findAll() to an array?

14条回答
  •  孤城傲影
    2020-12-08 20:16

    Use DAO for arrays

    $array = Yii::app()->db->createCommand('SELECT * FROM tbl')->queryAll();
    

提交回复
热议问题