/** * @param integer $limit * @param integer $offset * * @return array|false */ public function getChanges($limit = null, $offset = 0) { $query = "\n SELECT `id`, `message`, `message_short`, `datetime`, `commit_link`\n FROM `jpemeric_stream`.`changelog`\n ORDER BY `datetime` DESC"; if (!is_null($limit)) { $query .= "\n LIMIT {$offset}, {$limit}"; } return $this->connections->getRead()->fetchAll($query); }
public function getActivitiesByTypeCount($type) { $query = "\n SELECT COUNT(1) AS `count`\n FROM `jpemeric_stream`.`activity`\n WHERE `type` = :type"; $bindings = ['type' => $type]; return $this->connections->getRead()->fetchValue($query, $bindings); }