From a8e1c33b54ed612fd7fdbdb00a2663ee1ebdb9f3 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Mon, 24 Jan 2022 17:26:09 +0100 Subject: [PATCH] stick to single convention of binding parameters --- lib/Data/Database.php | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/lib/Data/Database.php b/lib/Data/Database.php index 583c4008..92aeec75 100644 --- a/lib/Data/Database.php +++ b/lib/Data/Database.php @@ -548,20 +548,15 @@ class Database extends AbstractData private static function _exec($sql, array $params) { $statement = self::$_db->prepare($sql); - if (self::$_type === 'oci') { - // It is not possible to execute in the normal way if strlen($param) >= 4000 - foreach ($params as $key => $parameter) { - $position = $key + 1; - if (is_int($parameter)) { - $statement->bindValue($position, $parameter, PDO::PARAM_INT); - } else { - $statement->bindValue($position, $parameter); - } + foreach ($params as $key => $parameter) { + $position = $key + 1; + if (is_int($parameter)) { + $statement->bindValue($position, $parameter, PDO::PARAM_INT); + } else { + $statement->bindValue($position, $parameter); } - $result = $statement->execute(); - } else { - $result = $statement->execute($params); } + $result = $statement->execute(); $statement->closeCursor(); return $result; }