From e1582445a9b83c081624fc289b7325986374f8b9 Mon Sep 17 00:00:00 2001 From: Guillermo Dev Date: Mon, 3 Dec 2018 11:18:42 +0100 Subject: [PATCH] allow to not pass pdo parameters to connection execute --- src/Db/Connection.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Db/Connection.php b/src/Db/Connection.php index acf2a51..82f6cb3 100644 --- a/src/Db/Connection.php +++ b/src/Db/Connection.php @@ -18,7 +18,7 @@ class Connection * @return OdbcResultSet|resource|string * @throws SqlException */ - public static function execute($sql, $values, $fetchMode = \PDO::FETCH_ASSOC) + public static function execute($sql, $values = array(), $fetchMode = \PDO::FETCH_ASSOC) { return new OdbcResultset(self::getReq()->getResultSet($sql, $values, $fetchMode)); } @@ -29,7 +29,7 @@ class Connection * @param $query * @return OdbcResultSet|resource|string */ - public static function executeDontThrow($sql, $values, $fetchMode = \PDO::FETCH_ASSOC) + public static function executeDontThrow($sql, $values = array(), $fetchMode = \PDO::FETCH_ASSOC) { try { $res = $this->execute($sql, $values, $fetchMode);