bug #1410078, error exporting query ending with semicolon

This commit is contained in:
Marc Delisle
2006-01-20 12:24:16 +00:00
parent c7b5fd2e3f
commit 3368571ee8
2 changed files with 8 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2006-01-20 Marc Delisle <lem9@users.sourceforge.net>
* export.php: bug #1410078, error exporting query ending with semicolon
2006-01-19 Marc Delisle <lem9@users.sourceforge.net> 2006-01-19 Marc Delisle <lem9@users.sourceforge.net>
* main.php: already defined constant * main.php: already defined constant
* libraries/display_create_table.lib.php: bug #1376314, I remove * libraries/display_create_table.lib.php: bug #1376314, I remove

View File

@@ -492,6 +492,11 @@ if ($export_type == 'server') {
} }
if (!empty($sql_query)) { if (!empty($sql_query)) {
// only preg_replace if needed
if (!empty($add_query)) {
// remove trailing semicolon before adding a LIMIT
$sql_query = preg_replace('%;\s*$%', '', $sql_query);
}
$local_query = $sql_query . $add_query; $local_query = $sql_query . $add_query;
PMA_DBI_select_db($db); PMA_DBI_select_db($db);
} else { } else {