numeric foreign keys

This commit is contained in:
Marc Delisle
2002-11-22 18:26:58 +00:00
parent 912c47f4e7
commit 54a30da611
2 changed files with 14 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2002-11-22 Marc Delisle <lem9@users.sourceforge.net>
* libraries/display_tbl.lib.php3: numeric foreign keys used as alias
2002-11-22 Alexander M. Turek <rabus@users.sourceforge.net> 2002-11-22 Alexander M. Turek <rabus@users.sourceforge.net>
* scripts/create-release.sh: The script should now work at the SF shell * scripts/create-release.sh: The script should now work at the SF shell
again. again.

View File

@@ -1042,6 +1042,17 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')) {
} else if ($row[$pointer] != '') { } else if ($row[$pointer] != '') {
$vertical_display['data'][$row_no][$i] = ' <td align="right" valign="top" bgcolor="' . $bgcolor . '">'; $vertical_display['data'][$row_no][$i] = ' <td align="right" valign="top" bgcolor="' . $bgcolor . '">';
reset($analyzed_sql[0]['select_expr']);
while (list ($select_expr_position, $select_expr) = each ($analyzed_sql[0]['select_expr'])) {
$alias = $analyzed_sql[0]['select_expr'][$select_expr_position]['alias'];
if (!empty($alias)) {
$true_column = $analyzed_sql[0]['select_expr'][$select_expr_position]['column'];
if ($alias == $meta->name) {
$meta->name = $true_column;
} // end if
} // end if
} // end while
if (isset($map[$meta->name])) { if (isset($map[$meta->name])) {
// Field to display from the foreign table? // Field to display from the foreign table?
if (!empty($map[$meta->name][2])) { if (!empty($map[$meta->name][2])) {