mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Treat DROP DATABASE from SQL query
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@974 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -441,16 +441,20 @@ class Adminer {
|
|||||||
<?php
|
<?php
|
||||||
if ($missing != "db" && strlen($_GET["db"])) {
|
if ($missing != "db" && strlen($_GET["db"])) {
|
||||||
$result = $dbh->query("SHOW TABLES");
|
$result = $dbh->query("SHOW TABLES");
|
||||||
if (!$result->num_rows) {
|
if (!$result) {
|
||||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
echo "<p class='error'>" . lang('No tables.') . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo "<p id='tables'>\n";
|
if (!$result->num_rows) {
|
||||||
while ($row = $result->fetch_row()) {
|
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||||
echo '<a href="' . h(ME) . 'select=' . urlencode($row[0]) . '">' . lang('select') . '</a> ';
|
} else {
|
||||||
echo '<a href="' . h(ME) . 'table=' . urlencode($row[0]) . '">' . $this->tableName(array("Name" => $row[0])) . "</a><br>\n"; //! Adminer::tableName may work with full table status
|
echo "<p id='tables'>\n";
|
||||||
|
while ($row = $result->fetch_row()) {
|
||||||
|
echo '<a href="' . h(ME) . 'select=' . urlencode($row[0]) . '">' . lang('select') . '</a> ';
|
||||||
|
echo '<a href="' . h(ME) . 'table=' . urlencode($row[0]) . '">' . $this->tableName(array("Name" => $row[0])) . "</a><br>\n"; //! Adminer::tableName may work with full table status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$result->free();
|
||||||
}
|
}
|
||||||
$result->free();
|
|
||||||
echo '<p><a href="' . h(ME) . 'create=">' . lang('Create new table') . "</a>\n";
|
echo '<p><a href="' . h(ME) . 'create=">' . lang('Create new table') . "</a>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user