#39023 [NEW]: problem with if when value = 0
| From: | nicolas dot breuer at belcenter dot be | Date: | Tue, 03 Oct 2006 10:27:56 +0000 |
| Subject: | #39023 [NEW]: problem with if when value = 0 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-103031@lists.php.net to get a copy of this message | ||
From: nicolas dot breuer at belcenter dot be
Operating system: Linux
PHP version: 4.4.4
PHP Bug Type: *General Issues
Bug description: problem with if when value = 0
Description:
------------
When i retrieve a value from a mysql db,
value returned is nothing or "0" , "if" command
is not executed as well.
Reproduce code:
---------------
// in a while process
$value="";
$reqt = mysql_query("select value from table where ref='$xxx'");
$value = mysql_result($reqt,0,"value");
if ($value=="0"){
echo "$value"; }
Expected result:
----------------
each echo value should be "0"
Actual result:
--------------
i have some results with $value = nothing.
--
Edit bug report at http://bugs.php.net/?id=39023&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39023&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39023&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39023&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39023&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39023&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39023&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39023&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39023&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39023&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39023&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39023&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39023&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39023&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39023&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39023&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39023&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39023&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39023&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39023&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39023&r=mysqlcfg