- Fixed a bug within INSERT query
This commit is contained in:
1 parent
3a80fee9c3
commit
62792e8325
3 files changed
+10
-7
No files matched your search
@@ -85,21 +85,23 @@ class PdoObject extends PDO {
|
||||
foreach($parameters as $key => $value) {
|
||||
switch(strtolower(gettype($value))) {
|
||||
case "boolean":
|
||||
$statement->bindValue($key, $value, Pdo::PARAM_BOOL);
|
||||
$type = Pdo::PARAM_BOOL;
|
||||
break;
|
||||
|
||||
case "integer":
|
||||
$statement->bindValue($key, $value, Pdo::PARAM_INT);
|
||||
$type = Pdo::PARAM_INT;
|
||||
break;
|
||||
|
||||
case "null":
|
||||
$statement->bindValue($key, $value, Pdo::PARAM_NULL);
|
||||
$type = Pdo::PARAM_NULL;
|
||||
break;
|
||||
|
||||
case "string":
|
||||
default:
|
||||
$statement->bindValue($key, (string) $value, Pdo::PARAM_STR);
|
||||
$type = Pdo::PARAM_STR;
|
||||
}
|
||||
|
||||
$statement->bindValue($key, (string) $value, $type);
|
||||
}
|
||||
|
||||
$this->executionStatus = $statement->execute();
|
||||
|
||||
Reference in new issue
Block a user