protected function getGerritProjectsByServerId($serverId)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`, `name` FROM ' . Database::TABLE_PROJECT . '
                  WHERE `server_id` = :server_id';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':server_id', $serverId, \PDO::PARAM_INT);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
protected function getGerritProjectsByServerId($serverId)
    {
        $dbHandle = $this->getDatabase()->getDatabaseConnection();

        $query = 'SELECT `id`, `name` FROM ' . Database::TABLE_PROJECT . '
                  WHERE `server_id` = :server_id';
        $statement = $dbHandle->prepare($query);

        $statement->bindParam(':server_id', $serverId, \PDO::PARAM_INT);
        $executeResult = $statement->execute();

        $statement = $this->getDatabase()->checkQueryError($statement, $executeResult);
        return $statement->fetchAll(\PDO::FETCH_ASSOC);
    }
protected function getGerritProjectsByServerId ( $ serverId ) { $ dbHandle = $ this -> getDatabase ( ) -> getDatabaseConnection ( ) ; $ query = 'SELECT `id`, `name` FROM ' . Database :: TABLE_PROJECT . '
                  WHERE `server_id` = :server_id' ; $ statement = $ dbHandle -> prepare ( $ query ) ; $ statement -> bindParam ( ':server_id' , $ serverId , \ PDO :: PARAM_INT ) ; $ executeResult = $ statement -> execute ( ) ; $ statement = $ this -> getDatabase ( ) -> checkQueryError ( $ statement , $ executeResult ) ; return $ statement -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; }
Returns all projects by server id

@param int $serverId Server if of Gerrit server
@return array
Returns all projects by server id