duanqiao1961
2018-10-11 07:56
浏览 126
已采纳

如何从Yii 1.1中的查询中获取数组值

$us= Yii::app()->db->createCommand()
    ->select('default_number_of_devices')
    ->from('user')
    ->where('id=1')
    ->queryRow();
echo "$us";

I should have got one value instead of array type because id is unique. But $us appears to be an array instead of single number.

1条回答 默认 最新

相关推荐 更多相似问题