Bug #68311 [Asn->Dup]: Firebird return wrong value

From: Date: Thu, 03 Dec 2015 14:33:12 +0000
Subject: Bug #68311 [Asn->Dup]: Firebird return wrong value
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197568@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68311&edit=1 ID: 68311 Updated by: mariuz@php.net Reported by: info at der-dirigent dot de Summary: Firebird return wrong value -Status: Assigned +Status: Duplicate Type: Bug Package: PDO Firebird Operating System: Debian 7 PHP Version: 5.4.34 Assigned To: mariuz Block user comment: N Private report: N New Comment: Duplicate of #60052 Previous Comments: ------------------------------------------------------------------------ [2014-10-27 16:16:21] info at der-dirigent dot de Description: ------------ Dear List! i have a strange problem. I have a Firebird database (dialect 3). Firebird server: 2.0.6 I create a table, and insert a row like that: CREATE TABLE PRICE ( ID INTEGER NOT NULL, "NAME" VARCHAR(10), COST NUMERIC(15, 2)); INSERT INTO PRICE (ID, "NAME", COST) VALUES (2, 'my price2', -1); when i read it back i get strange value. I get -0.0 and not -1. Thanks for your advice, Paul Test script: --------------- $db=new PDO("firebird:dbname=localhost:c:/test/test.fdb","testuser","testpassword",array()); $sql="select cost from price where id=2"; $q=$db->query($sql); $ret=$q->fetchAll(PDO::FETCH_ASSOC); print_r($ret); result: Array ( [0] => Array ( [COST] => -0.00 ) ) Expected result: ---------------- -1.00 Actual result: -------------- -0.00 ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68311&edit=1

« previous php.bugs (#197568) next »