diff --git a/dump.inc.php b/dump.inc.php
index b7c3b536..047e01f4 100644
--- a/dump.inc.php
+++ b/dump.inc.php
@@ -45,7 +45,7 @@ if (strlen($_GET["db"])) {
} else {
$result = mysql_query("SHOW DATABASES");
while ($row = mysql_fetch_assoc($result)) {
- if ($row["Database"] != "information_schema") {
+ if ($row["Database"] != "information_schema" || mysql_get_server_info() < 5) {
if (mysql_select_db($row["Database"])) {
dump($row["Database"]);
}
diff --git a/index.php b/index.php
index 5494cab2..df9b132a 100644
--- a/index.php
+++ b/index.php
@@ -32,21 +32,23 @@ if (isset($_GET["dump"])) {
} else {
page_header(htmlspecialchars(lang('Database') . ": " . $_GET["db"]));
echo '
' . lang('Alter database') . "
\n";
- $result = mysql_query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "'");
- if (mysql_num_rows($result)) {
- echo "" . lang('Routines') . "
\n";
- echo "\n";
- while ($row = mysql_fetch_assoc($result)) {
- echo "";
- echo "" . htmlspecialchars($row["ROUTINE_TYPE"]) . " | ";
- echo "" . htmlspecialchars($row["ROUTINE_NAME"]) . " | "; //! parameters from SHOW CREATE {PROCEDURE|FUNCTION}
- echo "" . nl2br(htmlspecialchars($row["ROUTINE_DEFINITION"])) . " | ";
- echo "
\n";
- //! call, drop, replace
+ if (mysql_get_server_info() >= 5) {
+ $result = mysql_query("SELECT * FROM information_schema.ROUTINES WHERE ROUTINE_SCHEMA = '" . mysql_real_escape_string($_GET["db"]) . "'");
+ if (mysql_num_rows($result)) {
+ echo "" . lang('Routines') . "
\n";
+ echo "\n";
+ while ($row = mysql_fetch_assoc($result)) {
+ echo "";
+ echo "" . htmlspecialchars($row["ROUTINE_TYPE"]) . " | ";
+ echo "" . htmlspecialchars($row["ROUTINE_NAME"]) . " | "; //! parameters from SHOW CREATE {PROCEDURE|FUNCTION}
+ echo "" . nl2br(htmlspecialchars($row["ROUTINE_DEFINITION"])) . " | ";
+ echo "
\n";
+ //! call, drop, replace
+ }
+ echo "
\n";
}
- echo "
\n";
+ mysql_free_result($result);
}
- mysql_free_result($result);
}
page_footer();
}
diff --git a/table.inc.php b/table.inc.php
index a47a956b..79d606b1 100644
--- a/table.inc.php
+++ b/table.inc.php
@@ -32,13 +32,15 @@ if ($foreign_keys) {
echo "\n";
}
-$result = mysql_query("SHOW TRIGGERS LIKE '" . mysql_real_escape_string($_GET["table"]) . "'");
-if (mysql_num_rows($result)) {
- echo "" . lang('Triggers') . "
\n";
- echo "\n";
- while ($row = mysql_fetch_assoc($result)) {
- echo "$row[Timing] | $row[Event] | " . htmlspecialchars($row["Statement"]) . " |
\n";
+if (mysql_get_server_info() >= 5) {
+ $result = mysql_query("SHOW TRIGGERS LIKE '" . mysql_real_escape_string($_GET["table"]) . "'");
+ if (mysql_num_rows($result)) {
+ echo "" . lang('Triggers') . "
\n";
+ echo "\n";
+ while ($row = mysql_fetch_assoc($result)) {
+ echo "$row[Timing] | $row[Event] | " . htmlspecialchars($row["Statement"]) . " |
\n";
+ }
+ echo "
\n";
}
- echo "
\n";
+ mysql_free_result($result);
}
-mysql_free_result($result);