ID: 15255
Updated by: sander
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Feedback
Old Bug Type: Unknown/Other Function
Bug Type: PostgreSQL related
Operating System: Linux rh 7.2
PHP Version: 4.1.1
New Comment:

Can you try a vardump() on $ren? What's the output?

Reclassified.


Previous Comments:
------------------------------------------------------------------------

[2002-01-28 10:21:43] [EMAIL PROTECTED]

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 this bug report at http://bugs.php.net/?id=15255&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to