bug 601809
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2002-09-12 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* libraries/display_tbl.lib.php3: bug 601809: when two fields have the
|
||||||
|
same name, both are showed NULL even if only one is NULL
|
||||||
|
|
||||||
2002-09-12 Alexander M. Turek <rabus@users.sourceforge.net>
|
2002-09-12 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* lang/italian-*.inc.php3: Updates, thanks again to Pietro Danesi (danone).
|
* lang/italian-*.inc.php3: Updates, thanks again to Pietro Danesi (danone).
|
||||||
|
|
||||||
|
@@ -1000,9 +1000,20 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
// depend on whether the "is_null" php4 function is
|
// depend on whether the "is_null" php4 function is
|
||||||
// available or not
|
// available or not
|
||||||
$pointer = (function_exists('is_null') ? $i : $meta->name);
|
$pointer = (function_exists('is_null') ? $i : $meta->name);
|
||||||
|
|
||||||
if ($meta->numeric == 1) {
|
if ($meta->numeric == 1) {
|
||||||
if (!isset($row[$meta->name])
|
|
||||||
|
// lem9: if two fields have the same name (this is possible
|
||||||
|
// with self-join queries, for example), using $meta->name
|
||||||
|
// will show both fields NULL even if only one is NULL,
|
||||||
|
// so use the $pointer
|
||||||
|
// (works only if function_exists('is_null')
|
||||||
|
// PS: why not always work with the number ($i), since
|
||||||
|
// the default second parameter of
|
||||||
|
// mysql_fetch_array() is MYSQL_BOTH, so we always get
|
||||||
|
// associative and numeric indices?
|
||||||
|
|
||||||
|
//if (!isset($row[$meta->name])
|
||||||
|
if (!isset($row[$pointer])
|
||||||
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
||||||
$vertical_display['data'][$row_no][$i] = ' <td align="right" valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
$vertical_display['data'][$row_no][$i] = ' <td align="right" valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
||||||
} else if ($row[$pointer] != '') {
|
} else if ($row[$pointer] != '') {
|
||||||
@@ -1050,7 +1061,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
if (eregi('BINARY', $field_flags)) {
|
if (eregi('BINARY', $field_flags)) {
|
||||||
$vertical_display['data'][$row_no][$i] = ' <td align="center" valign="top" bgcolor="' . $bgcolor . '">[BLOB]</td>' . "\n";
|
$vertical_display['data'][$row_no][$i] = ' <td align="center" valign="top" bgcolor="' . $bgcolor . '">[BLOB]</td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
if (!isset($row[$meta->name])
|
//if (!isset($row[$meta->name])
|
||||||
|
if (!isset($row[$pointer])
|
||||||
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
||||||
$vertical_display['data'][$row_no][$i] = ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
$vertical_display['data'][$row_no][$i] = ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
||||||
} else if ($row[$pointer] != '') {
|
} else if ($row[$pointer] != '') {
|
||||||
@@ -1068,7 +1080,8 @@ if (!defined('PMA_DISPLAY_TBL_LIB_INCLUDED')){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isset($row[$meta->name])
|
//if (!isset($row[$meta->name])
|
||||||
|
if (!isset($row[$pointer])
|
||||||
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
|| (function_exists('is_null') && is_null($row[$pointer]))) {
|
||||||
$vertical_display['data'][$row_no][$i] = ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
$vertical_display['data'][$row_no][$i] = ' <td valign="top" bgcolor="' . $bgcolor . '"><i>NULL</i></td>' . "\n";
|
||||||
} else if ($row[$pointer] != '') {
|
} else if ($row[$pointer] != '') {
|
||||||
|
Reference in New Issue
Block a user