Bugs item #676740, was opened at 2003-01-29 13:19
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=403611&aid=676740&group_id=31885
Category: None
Group: current CVS
Status: Open
Resolution: None
Priority: 5
Submitted By: tobozo (tobozo)
Assigned to: Nobody/Anonymous (nobody)
Summary: table.inc V1.4 ignores NULL values in database mode
Initial Comment:
File : table.inc v1.4 (1.4 2002/04/28 08:12:54
richardarcher)
CVS Module : php_lib
Database layer used : db_oci8
the table class skips the display of the <td> for each
element of the array passed to the 'show_table_cells' if
those elements containing NULL values
This breaks the html table structure and prevents results
to be displayed in some browsers, and gives a wrong
column display on others.
ex :
structure for the queried table :
$fields = array (
'0' => 'somefield',
'1' => 'someotherfield',
'2' => 'hugo',
'3' => 'bla'
);
structure of the returned data
$data = array (
0 => array (
'somefield' =>'something',
'someotherfield' =>'something else',
'hugo' =>'', // <------- NULL
'bla' => '1231654645'
),
1 => array (
'somefield' =>'something different',
'someotherfield' =>'', // <-- NULL
'hugo' =>'gneh', // <------- NOT NULL
'bla' => '4654654645'
),
2 => array (
'somefield' =>'something',
'someotherfield' =>'something else',
'hugo' =>'hugo', // <------- NOT NULL
'bla' => '1231654645'
),
Workaround (certainly not a valid fix but it worked for
me):
comment lines 610 and 612 like this :
/*if (isset($data[$val])) {*/
$this->table_cell($row, $cell++, $val, $data[$val],
$class);
/*}*/
so even if data is NULL it will display an empty html cell.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=403611&aid=676740&group_id=31885
|