diff --git a/ChangeLog b/ChangeLog index c7a52b2fb..e9f790b17 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-06-10 Marc Delisle + * db_details_qbe.php3: bug 751787, missing FROM part in query generator + 2003-06-10 Michal Cihar * scripts/create-release.sh: Set correct permissions before releasing. * Documentation, config.inc.php3, db_details_export.php3, export.php3, diff --git a/db_details_qbe.php3 b/db_details_qbe.php3 index 877738c1e..a770dff22 100755 --- a/db_details_qbe.php3 +++ b/db_details_qbe.php3 @@ -1000,11 +1000,15 @@ if (isset($Field) && count($Field) > 0) { } // end count($Field) > 0 -// Now let's see what we got -if (!empty($qry_from)) { - $encoded_qry .= urlencode('FROM ' . $qry_from . "\n"); - echo 'FROM ' . htmlspecialchars($qry_from) . "\n"; +// In case relations are not defined, just generate the FROM clause +// from the list of tables, however we don't generate any JOIN + +if (empty($qry_from)) { + $qry_from = implode(', ', $tab_all); } +// Now let's see what we got +$encoded_qry .= urlencode('FROM ' . $qry_from . "\n"); +echo 'FROM ' . htmlspecialchars($qry_from) . "\n"; // 3. WHERE $qry_where = '';