/** * Create the SQL of a mathematical expression * @param zibo\library\database\manipulation\expression\MathematicalExpression $expression * @param boolean $useAlias * @return string SQL of the mathematical expression */ protected function parseMathematicalExpression(MathematicalExpression $expression, $useAlias = true) { $parts = $expression->getParts(); $sql = ''; foreach ($parts as $part) { if ($sql) { $sql .= ' ' . $part->getOperator() . ' '; } $sql .= $this->parseExpression($part->getExpression(), false); } return '(' . $sql . ')'; }