Skip to content

Commit

Permalink
row fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuneteller committed Dec 29, 2015
1 parent be32e64 commit b5e2804
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/phpOlap/Mdx/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,19 @@ public function toMdx()
}

if (count($this->rowElements) == 0) {
throw new QueryException('Axis "ROW" can\'t be empty');
//throw new QueryException('Axis "ROW" can\'t be empty');
}

$nonEmpty = $this->nonEmpty ? 'NON EMPTY ' : '';

$mdx = "SELECT " .
$nonEmpty .
$this->getMdxPart($this->colElements) .
" ON COLUMNS, " .
$nonEmpty .
" ON 0 " .
($this->getMdxPart($this->rowElements)?
', '.$nonEmpty .
$this->getMdxPart($this->rowElements) .
" ON ROWS" .
" ON 1" :'').
" FROM " .
$this->cubeName;

Expand Down Expand Up @@ -222,3 +223,4 @@ static public function getDimensionUniqueName($element)
}

}

0 comments on commit b5e2804

Please sign in to comment.