public function sum($table, $join, $column = null, $where = null) { $query = $this->query($this->select_context($table, $join, $column, $where, 'SUM')); return $query ? 0 + $query->fetchColumn() : false; }
/** * @param $table * @param $column * @param null $where * @return int */ public function sum($table, $column, $where = NULL) { if (empty($this->_reader)) { return $this->_writer->sum($table, $column, $where); } else { return $this->_reader->sum($table, $column, $where); } }