php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9257 Problem with values returned from a select statement
Submitted: 2001-02-14 08:14 UTC Modified: 2001-05-03 03:31 UTC
From: fabionl at baydenet dot com dot br Assigned: jah (profile)
Status: Closed Package: InterBase related
PHP Version: 4.0.4pl1 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fabionl at baydenet dot com dot br
New email:
PHP Version: OS:

 

 [2001-02-14 08:14 UTC] fabionl at baydenet dot com dot br
$sele = "select data,hora,historico,valor from saldos ";
$sele .= "where data between '$dataini1' and '$datafin1'";
$q = ibase_prepare($i,$sele);
$result = ibase_execute($q);
while ($row = ibase_fetch_object($result))
  {
  echo $row->VALOR;
  }

//------------
saldos is a view and its defined as:
CREATE VIEW "SALDOS" (
  "DATA", 
  "HORA", 
  "CAIXA", 
  "VALOR", 
  "HISTORICO"
) AS
SELECT data,hora,caixa,valor,historico
  FROM entradas
UNION
SELECT data, hora, caixa, (valor*-1) "VALOR", historico
  FROM saidas
;

The field "valor" in the tables "entradas" and "saidas" is defined as numeric(11,2)...

The problem is that the code above returns for example "10.10" when the value of the field is "10.01"...

it's a really big problem, and i dont know what to do... :(

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-02-14 18:54 UTC] jah@php.net
Yes, this seems quite bad, and I got today another email
(privately) complaining about a same kind of thing
happening. I'm afraid it takes a few days before I can
really look what's happening, it can take some time (which
I don't have much...). Fortunately, the other bug reporter
gave quite a good hint where exactly in the source the bug seems to be.
 [2001-02-16 08:26 UTC] fabionl at baydenet dot com dot br
ok... really thx...   :)

[]'s


 [2001-05-03 03:31 UTC] sniper@php.net
This should be fixed in CVS now.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 19:01:28 2024 UTC