| Conditions | 3 |
| Paths | 2 |
| Total Lines | 4 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function aggregate($table, $function, $field, $where, $args, $group) { |
||
| 19 | if ($group == true) $groupBy = ' GROUP BY ' . $field; |
||
| 20 | else $groupBy = ''; |
||
| 21 | return new Query('SELECT ' . $function . '(' . $field . ') as val, ' . $field . ' FROM ' . $table . ($where != null ? ' WHERE ' . $where : '') . ' ' . $groupBy, $args); |
||
| 22 | } |
||
| 24 |