/** * @return bool */ private function hasMigrationsTable() { if (!isset($this->hasMigrationsTable)) { $this->hasMigrationsTable = (bool) $this->db->fetchValue('SHOW TABLES LIKE ?', [$this->migrationsTableName]); } return $this->hasMigrationsTable; }
/** * @param string $channel * @return int */ protected function getChannelEntriesCount($channel) { return $this->db->fetchValue('SELECT COUNT(*) FROM `' . $this->table . '` WHERE `channel` = ?', [$channel]); }