PHP 4.0 Bug #9257: Problem with values returned from a select statement
| From: | fabionl at baydenet dot com dot br | Date: | Wed, 14 Feb 2001 13:14:05 +0000 |
| Subject: | PHP 4.0 Bug #9257: Problem with values returned from a select statement | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-46552@lists.php.net to get a copy of this message | ||
From: fabionl@baydenet.com.br
Operating system: Linux
PHP version: 4.0.4pl1
PHP Bug Type: InterBase related
Bug description: Problem with values returned from a select statement
$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... :(
--
Edit Bug report at: http://bugs.php.net/?id=9257&edit=1