php.net |  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
10 + 44 = ?
Subscribe to this entry?

 
 [2008-02-20 06:37 UTC] yetos at seznam dot cz
Description:
------------
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->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$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) {
  ["COL1"]=>
  string(8) "12:34:56"
  [0]=>
  string(8) "12:34:56"
}

Actual result:
--------------
array(2) {
  ["COL1"]=>
  string(8) " 12:34:5"
  [0]=>
  string(8) " 12:34:5"
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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 5.2.5.5) on Windows XP
 [2008-08-28 08:11 UTC] opendev at us dot ibm dot com
Hi,

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

Regards,
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.

Regards,
Ambrish Bhargava
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 01:01:31 2024 UTC