Allow for Integer Literals in PDO Database Driver

This should fix things like "LIMIT ?"
This commit is contained in:
miqrogroove 2018-06-21 11:42:43 -04:00 committed by GitHub
parent 88e532321f
commit 759dfe6bb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -427,7 +427,12 @@ class dba {
}
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()) {