mirror of
https://github.com/vrana/adminer.git
synced 2026-07-30 10:19:39 +02:00
$mysql->result takes always first row
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@116 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -11,7 +11,7 @@ function dump($db) {
|
||||
$result = $mysql->query("SHOW $routine STATUS");
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
if (!strlen($_GET["db"]) || $row["Db"] === $_GET["db"]) {
|
||||
$routines[$row["Db"]][] = $mysql->result($mysql->query("SHOW CREATE $routine " . idf_escape($row["Db"]) . "." . idf_escape($row["Name"])), 0, 2) . ";;\n\n";
|
||||
$routines[$row["Db"]][] = $mysql->result($mysql->query("SHOW CREATE $routine " . idf_escape($row["Db"]) . "." . idf_escape($row["Name"])), 2) . ";;\n\n";
|
||||
}
|
||||
}
|
||||
$result->free();
|
||||
@@ -21,7 +21,7 @@ function dump($db) {
|
||||
|
||||
$result = $mysql->query("SHOW CREATE DATABASE " . idf_escape($db));
|
||||
if ($result) {
|
||||
echo $mysql->result($result, 0, 1) . ";\n";
|
||||
echo $mysql->result($result, 1) . ";\n";
|
||||
$result->free();
|
||||
}
|
||||
echo "USE " . idf_escape($db) . ";\n";
|
||||
@@ -30,7 +30,7 @@ function dump($db) {
|
||||
while ($row = $result->fetch_assoc()) {
|
||||
$result1 = $mysql->query("SHOW CREATE TABLE " . idf_escape($row["Name"]));
|
||||
if ($result1) {
|
||||
echo $mysql->result($result1, 0, 1) . ";\n";
|
||||
echo $mysql->result($result1, 1) . ";\n";
|
||||
$result1->free();
|
||||
if (isset($row["Engine"])) {
|
||||
$result1 = $mysql->query("SELECT * FROM " . idf_escape($row["Name"])); //! enum and set as numbers
|
||||
|
||||
Reference in New Issue
Block a user