$least_buy = WB_UserAmountTrade::find()->select(['samount'=>'SUM(samount)'])->where(['in_userid'=>$userid,'status'=>3])->one();
select(['samount'=>'SUM(samount)'])
第一個samount ('samount')爲別名,第二個samount('SUM(samount)')爲你要查詢的字段。
$least_buy = WB_UserAmountTrade::find()->select(['samount'=>'SUM(samount)'])->where(['in_userid'=>$userid,'status'=>3])->one();
select(['samount'=>'SUM(samount)'])
第一個samount ('samount')爲別名,第二個samount('SUM(samount)')爲你要查詢的字段。
'class' => 'CButtonColumn', 'template' => '{update}{delete}', 'updateButtonUrl' =>'Yii::app
yii框架中日誌組件記錄的等級5類,在CLogger已通過常量定義: const LEVEL_TRACE='trace'; const LEVEL_