php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15255 problem in structure control
Submitted: 2002-01-28 10:21 UTC Modified: 2002-03-01 00:00 UTC
Votes:2
Avg. Score:2.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: jerco at chile3000 dot com Assigned:
Status: No Feedback Package: PostgreSQL related
PHP Version: 4.1.1 OS: Linux rh 7.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jerco at chile3000 dot com
New email:
PHP Version: OS:

 

 [2002-01-28 10:21 UTC] jerco at chile3000 dot com
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...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-01-28 10:44 UTC] sander@php.net
Can you try a vardump() on $ren? What's the output?

Reclassified.
 [2002-03-01 00:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 20:01:29 2024 UTC