Skip to content

Commit

Permalink
Update Parameter.php
Browse files Browse the repository at this point in the history
  • Loading branch information
dezbyte authored Nov 23, 2017
1 parent 8473eec commit 6009a47
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Colibri/Query/Expr/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ public function setParameter($parameter)
*/
public function toSQL()
{
return $this->escape($this->parameter, $this->parameterType);
switch ($this->parameterType) {
case Parameter::TYPE_NUMERIC:
case Parameter::TYPE_BOOLEAN:
return (integer)$this->parameter;
default:
return $this->escape($this->parameter, $this->parameterType);
}
}

/**
Expand All @@ -84,4 +90,4 @@ public function __toString()
}


}
}

0 comments on commit 6009a47

Please sign in to comment.