|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-12-10 11:31 UTC] swepatel at us dot ibm dot com
[2007-12-11 04:20 UTC] vlads at krediidiinfo dot ee
[2007-12-12 15:18 UTC] opendev at us dot ibm dot com
[2008-02-05 05:34 UTC] matthias dot djihangiroff at persona dot de
[2008-03-11 11:55 UTC] opendev at us dot ibm dot com
[2021-08-11 14:51 UTC] cmb@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 06:00:01 2025 UTC |
Description: ------------ Trying to insert a date into a table using TO_DATE function returns an error if attribute PDO::ATTR_ORACLE_NULLS is set to PDO::NULL_TO_STRING and no rows are inserted. If this attribute is not set, no error is returned and no rows are inserted also. Reproduce code: --------------- /* create table test_pdo ( name char(10) not null, some_d date not null ) */ $ifx = new PDO('informix:host=db.kisise;service=1526;database=krediit;server=db_krediit;protocol=onsoctcp; EnableScrollableCursors=0','someuser','somepass'); $ifx->setAttribute(PDO::ATTR_ORACLE_NULLS, PDO::NULL_TO_STRING); $istmt = $ifx->prepare('insert into test_pdo (name, some_d) values(:n, TO_DATE(:d,"%d.%m.%Y"))'); $istmt->execute(array('n' => 'test', 'd' => '02.02.2002')); Expected result: ---------------- The row is inserted into a table Actual result: -------------- Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[]: <<Unknown error>>: 0 (SQLExecute[0] at /root/php/PDO_INFORMIX-1.1.0/informix_statement.c:720)