|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #77192 Rounding of double precision column
Submitted: 2018-11-23 13:54 UTC Modified: -
From: celiorod21 at gmail dot com Assigned:
Status: Open Package: PDO Firebird
PHP Version: 7.2.12 OS: Irrelevant
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.
Block user comment
Status: Assign to:
Bug Type:
From: celiorod21 at gmail dot com
New email:
PHP Version: OS:


 [2018-11-23 13:54 UTC] celiorod21 at gmail dot com
I'm working with geolocation and storing latitude and longitude data in a DOUBLE PRECISION field on firebird.

When searching for these records, the PDO is rounding the values, as well as returning them as a string.

The insertion of the data is not done from PDO but by an external system and is correct.

Test script:
  $conn = new PDO("firebird:dbname={$database}", "SYSDBA", "masterkey");

  $query = $conn->query('SELECT CAST(25.3639309364232 AS DOUBLE PRECISION) FROM RDB$DATABASE');

  echo $query->fetchColumn();

Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Thu Dec 13 09:01:26 2018 UTC