diff --git a/ChangeLog b/ChangeLog index b02558053..e86efb3fe 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-01-20 Marc Delisle + * export.php: bug #1410078, error exporting query ending with semicolon + 2006-01-19 Marc Delisle * main.php: already defined constant * libraries/display_create_table.lib.php: bug #1376314, I remove diff --git a/export.php b/export.php index a9d03fc5c..cebe6b4dd 100644 --- a/export.php +++ b/export.php @@ -492,6 +492,11 @@ if ($export_type == 'server') { } 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; PMA_DBI_select_db($db); } else {