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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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: Fri Dec 27 10:01:28 2024 UTC