S
S
Svetlana Galenko2019-06-01 12:39:58
MySQL
Svetlana Galenko, 2019-06-01 12:39:58

Which mysql method to use in yii1 when adding?

hello what mysql method to use in yii1 when adding?
Here is the code I am using but the sum method is not working:

$query = Yii::app()->db->createCommand()->from('users_payouts');
sum = $query->sum('sum');

Browser gives an error:
В классе CDbCommand и его поведениях не найден метод или замыкание с именем "sum".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IceJOKER, 2017-06-22
@IceJOKER

Rebuild the project (menu item Build => Rebuild, if I'm not mistaken), then open any method and start typing JSONPar... (without dots) and press Ctrl + Пробел, select the required class from the drop-down menu (look at the package name).
Or type in full JSONParser, press Alt + Enter=> importand select the desired package name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question