Skip to content

Commit

Permalink
Merge pull request #208 from SneakyBobito/patch-1
Browse files Browse the repository at this point in the history
Fix bindParams to bindParam
  • Loading branch information
treffynnon committed Jun 18, 2014
2 parents 36aeaa6 + 9a2dfbf commit 0770bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion idiorm.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ protected static function _execute($query, $parameters = array(), $connection_na
if (is_null($parameters[$i])) $type = PDO::PARAM_NULL;
if (is_bool($parameters[$i])) $type = PDO::PARAM_BOOL;
if (is_int($parameters[$i])) $type = PDO::PARAM_INT;
$statement->bindParams($i + 1, $parameters[$i], $type);
$statement->bindParam($i + 1, $parameters[$i], $type);
}

$q = $statement->execute();
Expand Down
2 changes: 1 addition & 1 deletion test/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function execute($params = NULL) {
/**
* Add data to arrays
*/
public function bindParams($index, $value, $type)
public function bindParam($index, $value, $type)
{
// Do check on index, and type
if (!is_int($index)) throw new Exception('Incorrect parameter type. Expected $index to be an integer.');
Expand Down

0 comments on commit 0770bde

Please sign in to comment.