Advertisement
fernandezekiel

Untitled

Dec 2nd, 2014
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.17 KB | None | 0 0
  1. $q = new Query();
  2. $q->select = ['SUM(columnThatIWantToSumUp)'];
  3. $q->from = ["(" . $query->createCommand()->getRawSql()  . ") as sumOfTheColumn"];
  4. $total = $q->queryScalar();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement