allow to not pass pdo parameters to connection execute
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user