Browse Source

Allow for Integer Literals in PDO Database Driver

This should fix things like "LIMIT ?"
pull/5267/head
miqrogroove 3 years ago
committed by GitHub
parent
commit
759dfe6bb1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      include/dba.php

+ 6
- 1
include/dba.php 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()) {


Loading…
Cancel
Save