allow to not pass pdo parameters to connection execute

This commit is contained in:
Guillermo Dev
2018-12-03 11:18:42 +01:00
parent 6ab9ffc0d8
commit e1582445a9

View File

@@ -18,7 +18,7 @@ class Connection
* @return OdbcResultSet|resource|string * @return OdbcResultSet|resource|string
* @throws SqlException * @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)); return new OdbcResultset(self::getReq()->getResultSet($sql, $values, $fetchMode));
} }
@@ -29,7 +29,7 @@ class Connection
* @param $query * @param $query
* @return OdbcResultSet|resource|string * @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 { try {
$res = $this->execute($sql, $values, $fetchMode); $res = $this->execute($sql, $values, $fetchMode);