1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +02:00

Print SQL errors as comments in export

This commit is contained in:
Jakub Vrana
2025-02-23 17:42:23 +01:00
parent 04d707ef94
commit eb0d5c3c5e
2 changed files with 2 additions and 1 deletions

View File

@@ -392,7 +392,7 @@ function get_rows($query, $connection2 = null, $error = "<p class='error'>") {
while ($row = $result->fetch_assoc()) {
$return[] = $row;
}
} elseif (!$result && !is_object($connection2) && $error && defined("PAGE_HEADER")) {
} elseif (!$result && !is_object($connection2) && $error && (defined("PAGE_HEADER") || $error == "-- ")) {
echo $error . error() . "\n";
}
return $return;