Skip to content

Commit e9c40d5

Browse files
committed
Adicionar suporte para retorno de EXEC
1 parent f272a48 commit e9c40d5

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Database/Connection.php

+11-2
Original file line numberDiff line numberDiff line change
@@ -389,13 +389,22 @@ public function select($query, $bindings = [], $useReadPdo = true)
389389
return [];
390390
}
391391

392-
$statement = $this->getPdo()->query($this->compileNewQuery(
392+
$statement = $this->getPdo()->prepare($this->compileNewQuery(
393393
$query,
394394
$bindings
395395
));
396396

397+
$statement->execute();
397398

398-
$result = $statement->fetchAll($this->getFetchMode());
399+
$result = [];
400+
401+
try {
402+
do {
403+
$result += $statement->fetchAll($this->getFetchMode());
404+
} while ($statement->nextRowset());
405+
} catch (\Exception $e) {}
406+
407+
$result = [...$result];
399408

400409
$db_charset = env('SYBASE_DATABASE_CHARSET');
401410
$app_charset = env('SYBASE_APPLICATION_CHARSET');

0 commit comments

Comments
 (0)