|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-08-22 19:11 UTC] kurtb149 at yahoo dot com
Description: ------------ In the file: ext/pdo_oci/oci_statement.c the function oci_stmt_describe() does not allow for the data type "TIMESTAMP(0) WITH LOCAL TIME ZONE". Here is the diff of an updated oci_statement.c that would allow for the data type: $ cvs diff oci_statement.c Index: oci_statement.c =================================================================== RCS file: /repository/php-src/ext/pdo_oci/oci_statement.c,v retrieving revision 1.16 diff -r1.16 oci_statement.c 407a408,410 > #ifdef SQLT_TIMESTAMP_LTZ > || dtype == SQLT_TIMESTAMP_LTZ > #endif PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 00:00:01 2025 UTC |
1. Create a table in Oracle that used the "timestamp(0) with local time zone" type: SQL> create table ltz_test(aa timestamp(0) with local time zone not null) ; 2. Insert a row into ltz_test: SQL> insert into ltz_test values(current_timestamp); 3. Using PDO, read the table: <?php $dbh = new PDO('oci:', 'username', 'hello'); $dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbh->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); $sth = $dbh->prepare('select aa from ltz_test'); $sth->execute(); $r = $sth->fetch(); print $r[0] . "\n"; ?> The following error is produced: Warning: PDOStatement::fetch(): column 0 data was too large for buffer and was truncated to fit it in ltz_test.php on line 7