Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bindParams to bindParam #208

Merged
merged 2 commits into from
Jun 18, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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