add multiple dump feature (Feature #424176)

This commit is contained in:
Armel Fauveau
2001-06-09 03:20:06 +00:00
parent f5a52be9d5
commit 0523745dd6
3 changed files with 54 additions and 20 deletions

View File

@@ -5,12 +5,15 @@ phpMyAdmin - Changelog
$Id$
$Source$
2001-06-09 Armel Fauveau <armel.fauveau@globalis-ms.com>
* add multiple dump feature (Feature #424176)
2001-06-08 Marc Delisle <lem9@users.sourceforge.net>
* add hostname in title bar
* add hostname in title bar
2001-06-07 Marc Delisle <lem9@users.sourceforge.net>
* modify/implement Steve Alberty's patch for complete table dump
* implement Alessandro Astarita's patch for data only dump
* modify/implement Steve Alberty's patch for complete table dump
* implement Alessandro Astarita's patch for data only dump
2001-06-06 Armel Fauveau <armel.fauveau@globalis-ms.com>
* patch bookmark section in sql.php3 (bug #430628)

View File

@@ -96,6 +96,26 @@ if($cfgBookmark['db'] && $cfgBookmark['table'])
<li><a href="tbl_qbe.php3<?php echo $query;?>"><?php echo $strQBE;?></a>
<li><form method="post" action="db_dump.php3"><?php echo $strViewDumpDB;?><br>
<table>
<?php
$tables = mysql_list_tables($db);
$num_tables = @mysql_numrows($tables);
if($num_tables>1) {
print "<tr>\n";
print "\t<td colspan=\"2\">\n";
print "\t\t<select name=\"table_select[]\" size=\"5\" multiple>\n";
$i=0;
while($i < $num_tables) {
$table = mysql_tablename($tables, $i);
echo "\t\t\t<option value=\"".$table."\">".$table."</option>\n";
$i++;
}
echo "\t\t</select>\n";
echo "\t</td>\n";
echo "</tr>\n";
}
?>
<tr>
<td>
<input type="radio" name="what" value="structure" checked><?php echo $strStrucOnly;?>

View File

@@ -78,32 +78,43 @@ else
}
print " $strDatabase: $db$crlf";
if (isset($table_select)) {
$tmp_select=implode($table_select,"|");
$tmp_select="|".$tmp_select."|";
echo $tmp_select;
}
while($i < $num_tables)
{
$table = mysql_tablename($tables, $i);
if($what != "dataonly")
{
print $crlf;
print "# --------------------------------------------------------$crlf";
print "#$crlf";
print "# $strTableStructure '$table'$crlf";
print "#$crlf";
print $crlf;
if(isset($tmp_select) && is_int(strpos($tmp_select,"|".$table."|"))==false)
$i++;
else {
echo get_table_def($db, $table, $crlf).";$crlf$crlf";
}
if(($what == "data") || ($what == "dataonly"))
{
if($what != "dataonly")
{
print $crlf;
print "# --------------------------------------------------------$crlf";
print "#$crlf";
print "# $strDumpingData '$table'$crlf";
print "# $strTableStructure '$table'$crlf";
print "#$crlf";
print $crlf;
get_table_content($db, $table, "my_handler");
echo get_table_def($db, $table, $crlf).";$crlf$crlf";
}
if(($what == "data") || ($what == "dataonly"))
{
print "#$crlf";
print "# $strDumpingData '$table'$crlf";
print "#$crlf";
print $crlf;
get_table_content($db, $table, "my_handler");
}
$i++;
}
$i++;
}
}