summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/database.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/admin/database.php b/admin/database.php
index 47ffd29..451e475 100644
--- a/admin/database.php
+++ b/admin/database.php
@@ -16,7 +16,10 @@ require_once '../core/application.php';
if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'command')) {
try {
$Statement = $Database->query(HTTP::POST('command'));
- $result = print_r($Statement->fetchAll(), TRUE);
+
+ do {
+ $result[] = print_r($Statement->fetchAll(), TRUE);
+ } while($Statement->nextRowset());
} catch(PDOException $Exception) {
$messages[] = $Exception->getMessage();
}
@@ -30,7 +33,7 @@ try {
$DatabaseTemplate->set('FORM', [
'INFO' => $messages ?? [],
'TOKEN' => Application::getSecurityToken(),
- 'RESULT' => $result ?? NULL,
+ 'RESULT' => implode(NULL, $result ?? []),
'COMMAND' => HTTP::POST('command'),
]);