fixed a bug with php < 4.0.6 (mysql_fetch_array did not return fields with NULL value)

This commit is contained in:
Loïc Chapeaux
2001-10-30 22:01:07 +00:00
parent 7aa7b1737f
commit b0f0ff251e
2 changed files with 6 additions and 2 deletions

View File

@@ -10,6 +10,8 @@ $Source$
* main.php3: removed an other display of the socket used and the port used
if the 'verbose' setting exists for a server.
* lang/italian.inc.php3: updated thanks to Pietro Danesi.
* left.php3: fixed a bug with php < 4.0.6 (mysql_fetch_array did not return
fields with NULL value).
2001-10-28 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* main.php3:

View File

@@ -192,7 +192,8 @@ if ($num_dbs > 1) {
$tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db));
while ($tmp = mysql_fetch_array($result)) {
$tooltip[$tmp['Name']] = rtrim($tmp['Comment'] . ' (' . $tmp['Rows'] . ' ' . $strRows . ')');
$tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '')
. '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')';
} // end while
} // end if
@@ -277,7 +278,8 @@ else if ($num_dbs == 1) {
$tooltip = array();
$result = mysql_query('SHOW TABLE STATUS FROM ' . backquote($db));
while ($tmp = mysql_fetch_array($result)) {
$tooltip[$tmp['Name']] = rtrim($tmp['Comment'] . ' (' . $tmp['Rows'] . ' ' . $strRows . ')');
$tooltip[$tmp['Name']] = (!empty($tmp['Comment']) ? $tmp['Comment'] . ' ' : '')
. '(' . (isset($tmp['Rows']) ? $tmp['Rows'] : '0') . ' ' . $strRows . ')';
} // end while
} // end if