Fixed a bug with the relation feature

This commit is contained in:
Loïc Chapeaux
2002-03-05 19:34:10 +00:00
parent f46518a856
commit 6cb77cb782
2 changed files with 7 additions and 3 deletions

View File

@@ -5,9 +5,13 @@ phpMyAdmin - Changelog
$Id$
$Source$
2002-03-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3, line 1306: fixed a bug reported by Marc
Delisle with the relation feature.
2002-03-04 Marc Delisle <lem9@users.sourceforge.net>
* user_details.php3: default value for wildcard db name
* lang/*.php3, $strDatabaseWildcard
* user_details.php3: default value for wildcard db name.
* lang/*.php3, $strDatabaseWildcard.
2002-03-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/display_tbl.lib.php3:

View File

@@ -1303,7 +1303,7 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
// $tabs = '(\'' . join('\',\'', spliti('`? *((on [^,]+)?,|(NATURAL )?(inner|left|right)( outer)? join) *`?',
// eregi_replace('^.*FROM +`?|`? *(on [^,]+)?(WHERE.*)?$', '', $sql_query))) . '\')';
$pattern = '`?[[:space:]]+(((ON|on)[[:space:]]+[^,]+)?,|((NATURAL|natural)[[:space:]]+)?(INNER|inner|LEFT|left|RIGHT|right)([[:space:]]+(OUTER|outer))?[[:space:]]+(JOIN|join))[[:space:]]*`?';
$target = eregi_replace('^.*[[:space:]]+FROM[[:space:]]+`?|`?[[:space:]]+(ON[[:space:]]+[^,]+)?(WHERE[[:space:]]+.*)?$', '', $sql_query);
$target = eregi_replace('^.*[[:space:]]+FROM[[:space:]]+`?|`?[[:space:]]*(ON[[:space:]]+[^,]+)?(WHERE[[:space:]]+.*)?$', '', $sql_query);
$tabs = '(\'' . join('\',\'', split($pattern, $target)) . '\')';
$local_query = 'SELECT src_column, dest_table, dest_column'