Fixed mysqli-specific export bugs.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2004-04-19 Marcel Tschopp <ne0x@users.sourceforge.net>
|
||||||
|
* libraries/export/sql.php, libraries/export/latex.php: Fixed a few
|
||||||
|
mysqli-specific export-bugs
|
||||||
|
|
||||||
2004-04-19 Marc Delisle <lem9@users.sourceforge.net>
|
2004-04-19 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* sql.php: bug 780516: capitalizing keywords: we no longer
|
* sql.php: bug 780516: capitalizing keywords: we no longer
|
||||||
put the formatted query into $sql_query, due to better pattern matching
|
put the formatted query into $sql_query, due to better pattern matching
|
||||||
|
@@ -220,6 +220,17 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
|
|||||||
{
|
{
|
||||||
global $cfgRelation;
|
global $cfgRelation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the unique keys in the table
|
||||||
|
*/
|
||||||
|
$keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
|
||||||
|
$keys_result = PMA_DBI_query($keys_query);
|
||||||
|
$unique_keys = array();
|
||||||
|
while($key = PMA_DBI_fetch_assoc($keys_result)) {
|
||||||
|
if ($key['Non_unique'] == 0) $unique_keys[] = $key['Column_name'];
|
||||||
|
}
|
||||||
|
PMA_DBI_free_result($keys_result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets fields properties
|
* Gets fields properties
|
||||||
*/
|
*/
|
||||||
@@ -244,16 +255,6 @@ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = fals
|
|||||||
$have_rel = FALSE;
|
$have_rel = FALSE;
|
||||||
} // end if
|
} // end if
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the unique keys in the table
|
|
||||||
*/
|
|
||||||
$keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
|
|
||||||
$keys_result = PMA_DBI_query($keys_query);
|
|
||||||
$unique_keys = array();
|
|
||||||
while($key = PMA_DBI_fetch_assoc($keys_result)) {
|
|
||||||
if ($key['Non_unique'] == 0) $unique_keys[] = $key['Column_name'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the table structure
|
* Displays the table structure
|
||||||
*/
|
*/
|
||||||
|
@@ -213,8 +213,8 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
|||||||
$schema_create .= $GLOBALS['comment_marker'] . $GLOBALS['strStatCheckTime'] . ': ' . PMA_localisedDate(strtotime($tmpres['Check_time'])) . $crlf;
|
$schema_create .= $GLOBALS['comment_marker'] . $GLOBALS['strStatCheckTime'] . ': ' . PMA_localisedDate(strtotime($tmpres['Check_time'])) . $crlf;
|
||||||
$new_crlf = $GLOBALS['comment_marker'] . $crlf . $crlf;
|
$new_crlf = $GLOBALS['comment_marker'] . $crlf . $crlf;
|
||||||
}
|
}
|
||||||
PMA_DBI_free_result($result);
|
|
||||||
}
|
}
|
||||||
|
PMA_DBI_free_result($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
$schema_create .= $new_crlf;
|
$schema_create .= $new_crlf;
|
||||||
@@ -230,7 +230,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false)
|
|||||||
} else {
|
} else {
|
||||||
PMA_DBI_query('SET SQL_QUOTE_SHOW_CREATE = 0');
|
PMA_DBI_query('SET SQL_QUOTE_SHOW_CREATE = 0');
|
||||||
}
|
}
|
||||||
$result = PMA_DBI_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table));
|
$result = PMA_DBI_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), NULL, PMA_DBI_QUERY_STORE);
|
||||||
if ($result != FALSE && PMA_DBI_num_rows($result) > 0) {
|
if ($result != FALSE && PMA_DBI_num_rows($result) > 0) {
|
||||||
$tmpres = PMA_DBI_fetch_row($result);
|
$tmpres = PMA_DBI_fetch_row($result);
|
||||||
// Fix for case problems with winwin, thanks to
|
// Fix for case problems with winwin, thanks to
|
||||||
|
Reference in New Issue
Block a user