mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/pdo: Fixed PDO::setAttribute() and PDO::getAttribute() (#12793)
This commit is contained in:
parent
e502aaf0c5
commit
866aa12bcd
17 changed files with 104 additions and 46 deletions
|
@ -1080,7 +1080,7 @@ static int pdo_firebird_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val)
|
|||
char tmp[INFO_BUF_LEN];
|
||||
|
||||
case PDO_ATTR_AUTOCOMMIT:
|
||||
ZVAL_LONG(val,dbh->auto_commit);
|
||||
ZVAL_BOOL(val,dbh->auto_commit);
|
||||
return 1;
|
||||
|
||||
case PDO_ATTR_CONNECTION_STATUS:
|
||||
|
@ -1124,6 +1124,18 @@ static int pdo_firebird_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val)
|
|||
case PDO_ATTR_FETCH_TABLE_NAMES:
|
||||
ZVAL_BOOL(val, H->fetch_table_names);
|
||||
return 1;
|
||||
|
||||
case PDO_FB_ATTR_DATE_FORMAT:
|
||||
ZVAL_STRING(val, H->date_format);
|
||||
return 1;
|
||||
|
||||
case PDO_FB_ATTR_TIME_FORMAT:
|
||||
ZVAL_STRING(val, H->time_format);
|
||||
return 1;
|
||||
|
||||
case PDO_FB_ATTR_TIMESTAMP_FORMAT:
|
||||
ZVAL_STRING(val, H->timestamp_format);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue