Skip to content

Commit c760494

Browse files
authored
Merge pull request #19 from marcelovsantos/master
Added support to multiples resultset
2 parents 6d24946 + 560fa8c commit c760494

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Database/SybaseConnection.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class SybaseConnection extends Connection {
2020
*
2121
* @throws \Exception
2222
*/
23-
public function transaction(Closure $callback)
23+
public function transaction(Closure $callback, $attempts = 1)
2424
{
2525
if ($this->getDriverName() == 'sqlsrv')
2626
{
@@ -372,7 +372,12 @@ public function select($query, $bindings = array(), $useReadPdo = true)
372372
if($offset>0){
373373
return $this->compileOffset($offset, $query, $bindings, $me);
374374
}else{
375-
return $this->getPdo()->query($this->compileNewQuery($query, $bindings))->fetchAll($me->getFetchMode());
375+
$result = [];
376+
$statement = $this->getPdo()->query($this->compileNewQuery($query, $bindings));
377+
do {
378+
$result+= $statement->fetchAll($me->getFetchMode());
379+
} while ($statement->nextRowset());
380+
return $result;
376381
}
377382
});
378383
}
@@ -398,4 +403,4 @@ public function affectingStatement($query, $bindings = array())
398403
return $this->getPdo()->query($this->compileNewQuery($query, $bindings))->rowCount();
399404
});
400405
}
401-
}
406+
}

0 commit comments

Comments
 (0)