protected function existsGerritServer($name, $host)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`
                  FROM ' . Database::TABLE_SERVER . '
                  WHERE `name` = :name AND `host` = :host LIMIT 1';


        $values = array(
            ':name' => $name,
            ':host' => $host
        );

        $statement = $dbHandle->prepare($query);
        $executeResult = $statement->execute($values);

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult, $values);
        return $statement->fetchColumn();
    }
protected function existsGerritServer($name, $host)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`
                  FROM ' . Database::TABLE_SERVER . '
                  WHERE `name` = :name AND `host` = :host LIMIT 1';


        $values = array(
            ':name' => $name,
            ':host' => $host
        );

        $statement = $dbHandle->prepare($query);
        $executeResult = $statement->execute($values);

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult, $values);
        return $statement->fetchColumn();
    }
protected function existsGerritServer ( $ name , $ host ) { $ dbHandle = $ this -> getDatabase ( ) -> getDatabaseConnection ( ) ; $ query = 'SELECT `id`
                  FROM ' . Database :: TABLE_SERVER . '
                  WHERE `name` = :name AND `host` = :host LIMIT 1' ; $ values = array ( ':name' => $ name , ':host' => $ host ) ; $ statement = $ dbHandle -> prepare ( $ query ) ; $ executeResult = $ statement -> execute ( $ values ) ; $ statement = $ this -> getDatabase ( ) -> checkQueryError ( $ statement , $ executeResult , $ values ) ; return $ statement -> fetchColumn ( ) ; }
Checks if a Gerrit server is known by our database.

@param string $name Name of configured Gerrit server
@param string $host Host of configured Gerrit server
@return string
Checks if a Gerrit server is known by our database .