|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58048 value of Interval is right shifted
Submitted: 2008-02-20 06:37 UTC Modified: 2008-11-11 06:39 UTC
From: yetos at seznam dot cz Assigned:
Status: Closed Package: PDO_INFORMIX (PECL)
PHP Version: 5.1.6 OS: RHEL 5.1
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: yetos at seznam dot cz
New email:
PHP Version: OS:


 [2008-02-20 06:37 UTC] yetos at seznam dot cz
Select interval value is right shifted 

"12:34:56"  - value in DB : INTERVAL HOUR TO SECOND

pdo_informix return as

" 12:34:5"

Datetime work OK

Reproduce code:
echo "<PRE>";

$db = new PDO("informix: database=dbxy; server=ds0_vyvoj");

$db->exec("CREATE TEMP TABLE ttt ( col1  interval hour to second ) ");
$db->exec("INSERT INTO ttt VALUES ('01:23:45' ) ");

$stm = $db->query("SELECT * FROM ttt");
foreach ( $stm as $row )
     var_dump( $row );

Expected result:
array(2) {
  string(8) "12:34:56"
  string(8) "12:34:56"

Actual result:
array(2) {
  string(8) " 12:34:5"
  string(8) " 12:34:5"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-22 09:18 UTC] cgourion at yahoo dot fr
Same bug with PDO_INFORMIX (php_pdo_informix.dll version on Windows XP
 [2008-08-28 08:11 UTC] opendev at us dot ibm dot com

We are able to reproduce this problem. We will fix this bug and make new release as soon as possible.

Ambrish Bhargava
 [2008-11-11 06:39 UTC] abhargav at in dot ibm dot com
Hi All,

"Value of Interval is right shifted" bug in PDO_INFORMIX has been fixed in 1.2.6 version release.

Ambrish Bhargava
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Mar 02 04:01:28 2024 UTC