Ejemplo n.º 1
0
 /**
  * @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);
 }
Ejemplo n.º 2
0
 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);
 }