返回多行

返回多行. 每行都是列名和值的关联数组. 如果该查询没有结果则返回空数组

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