Allow for Integer Literals in PDO Database Driver
This should fix things like "LIMIT ?"
This commit is contained in:
parent
88e532321f
commit
759dfe6bb1
|
@ -427,7 +427,12 @@ class dba {
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($args AS $param => $value) {
|
foreach ($args AS $param => $value) {
|
||||||
$stmt->bindParam($param, $args[$param]);
|
if (is_int($args[$param])) {
|
||||||
|
$data_type = PDO::PARAM_INT;
|
||||||
|
} else {
|
||||||
|
$data_type = PDO::PARAM_STR;
|
||||||
|
}
|
||||||
|
$stmt->bindParam($param, $args[$param], $data_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$stmt->execute()) {
|
if (!$stmt->execute()) {
|
||||||
|
|
Loading…
Reference in a new issue