]> granicus.if.org Git - php/commitdiff
[DOC] Added 3 firebird specific attributes that can be set via
authorLars Westermann <lwe@php.net>
Tue, 30 Oct 2007 16:28:47 +0000 (16:28 +0000)
committerLars Westermann <lwe@php.net>
Tue, 30 Oct 2007 16:28:47 +0000 (16:28 +0000)
PDO::setAttribute() to control formatting of date/timestamp columns:
PDO::FB_ATTR_DATE_FORMAT, PDO::FB_ATTR_TIME_FORMAT and
PDO::FB_ATTR_TIMESTAMP_FORMAT.  These attributes are strftime
format strings, and operate in the same way as the ibase.dateformat,
ibase.timeformat and ibase.timestampformat ini options.
(related to bug #36128, Interbase PDO)

ext/pdo_firebird/pdo_firebird.c

index ac09b5bc8980315c8cb66f72e2e93bcd23643c19..f69a2b3be0c02579ef82241d3f4fd4b79bd5dd4d 100644 (file)
@@ -55,6 +55,10 @@ ZEND_GET_MODULE(pdo_firebird)
 
 PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
 {
+       REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_DATE_FORMAT", (long) PDO_FB_ATTR_DATE_FORMAT);
+       REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIME_FORMAT", (long) PDO_FB_ATTR_TIME_FORMAT);
+       REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIMESTAMP_FORMAT", (long) PDO_FB_ATTR_TIMESTAMP_FORMAT);
+
        php_pdo_register_driver(&pdo_firebird_driver);
 
        return SUCCESS;