diff --git a/src/AbstractStatement.php b/src/AbstractStatement.php index e644774..e4b5d64 100644 --- a/src/AbstractStatement.php +++ b/src/AbstractStatement.php @@ -33,7 +33,16 @@ public function execute() { $stmt = $this->dbh->prepare($this->__toString()); if ($stmt !== false) { - $stmt->execute($this->getValues()); + foreach ($this->getValues() as $i => $value) { + $type = PDO::PARAM_STR; + if (is_int($value)) { + $type = PDO::PARAM_INT; + } + + $stmt->bindParam($i + 1, $value, $type); + } + + $stmt->execute(); } return $stmt;