complete table dump
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2001-06-07 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* modify/implement Steve Alberty's patch for complete table dump
|
||||||
|
|
||||||
2001-06-06 Armel Fauveau <armel.fauveau@globalis-ms.com>
|
2001-06-06 Armel Fauveau <armel.fauveau@globalis-ms.com>
|
||||||
* patch bookmark section in sql.php3 (bug #430628)
|
* patch bookmark section in sql.php3 (bug #430628)
|
||||||
|
|
||||||
|
13
lib.inc.php3
13
lib.inc.php3
@@ -478,6 +478,19 @@ function get_table_def($db, $table, $crlf)
|
|||||||
if(!empty($drop))
|
if(!empty($drop))
|
||||||
$schema_create .= "DROP TABLE IF EXISTS $table;$crlf";
|
$schema_create .= "DROP TABLE IF EXISTS $table;$crlf";
|
||||||
|
|
||||||
|
// Steve Alberty's patch for complete table dump,
|
||||||
|
// modified by Lem9 to allow older MySQL versions to continue to work
|
||||||
|
|
||||||
|
if(MYSQL_MAJOR_VERSION == "3.23"){
|
||||||
|
$result=mysql_query("show create table $db.$table");
|
||||||
|
if ($result!=false && mysql_num_rows($result)>0){
|
||||||
|
$tmpres=mysql_fetch_array($result);
|
||||||
|
$tmp=$tmpres[1];
|
||||||
|
$schema_create.=str_replace("\n",$crlf,$tmp);
|
||||||
|
}
|
||||||
|
return $schema_create;
|
||||||
|
}
|
||||||
|
|
||||||
$schema_create .= "CREATE TABLE $table ($crlf";
|
$schema_create .= "CREATE TABLE $table ($crlf";
|
||||||
|
|
||||||
$result = mysql_query("SHOW FIELDS FROM $db.$table") or mysql_die();
|
$result = mysql_query("SHOW FIELDS FROM $db.$table") or mysql_die();
|
||||||
|
Reference in New Issue
Block a user