diff --git a/ChangeLog b/ChangeLog index 896968967..28023e0b3 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-04-22 Michal Cihar + * libraries/export/sql.php: Invalid SQL on empty table export (bug + #939918). + 2004-04-21 Marc Delisle ### 2.6.0-alpha1 released * (after the release) user_password.php: undefined offset in blowfish.php diff --git a/libraries/export/sql.php b/libraries/export/sql.php index d205f0ae8..2fb6e0567 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -567,7 +567,9 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) if (!PMA_exportOutputHandler(($current_row == 1 ? '' : $separator . $crlf) . $insert_line)) return FALSE; } // end while - if (!PMA_exportOutputHandler(';' . $crlf)) return FALSE; + if ($current_row > 0) { + if (!PMA_exportOutputHandler(';' . $crlf)) return FALSE; + } } // end if ($result != FALSE) PMA_DBI_free_result($result);