Bug #15255: problem in structure control
| From: | jerco at chile3000 dot com | Date: | Mon, 28 Jan 2002 15:21:47 +0000 |
| Subject: | Bug #15255: problem in structure control | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-78302@lists.php.net to get a copy of this message | ||
From: jerco@chile3000.com
Operating system: Linux rh 7.2
PHP version: 4.1.1
PHP Bug Type: Unknown/Other Function
Bug description: problem in structure control
Hi..
I'm a user off Postgresql, and the problem is with a
a data type (decimal).
-------
$query_resultren=pg_exec ($connection,$queryren);
$ren=pg_result($query_resultren, 0, 0);
$number_rows_queryren = pg_numrows($query_resultren);
//echo "ren=$ren<br>";
if (!$ren)
{
--------
Ok, the problem is in "$ren" the result is 0.0, and for me 0.0=0 (or no),
i tried:
if ($ren=0)
if ($ren==0)
if ($ren==0.0)
if ($ren=="0.0")
but nothing!!!
My solution in this case is:
-------
$query_resultren=pg_exec ($connection,$queryren);
$ren=""""round""""(pg_result($query_resultren, 0, 0));
$number_rows_queryren = pg_numrows($query_resultren);
//echo "ren=$ren<br>";
if (!$ren)
{
--------
and this work...
--
Edit bug report at: http://bugs.php.net/?id=15255&edit=1