mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Fixed bug #51213 (pdo_mssql is trimming value of the money column).
This commit is contained in:
parent
3025ca8e17
commit
48adfafab8
2
NEWS
2
NEWS
@ -6,6 +6,8 @@ PHP NEWS
|
||||
- Added stream filter support to mcrypt extension (ported from
|
||||
mcrypt_filter). (Stas)
|
||||
|
||||
- Fixed bug #51213 (pdo_mssql is trimming value of the money column). (Ilia,
|
||||
alexr at oplot dot com)
|
||||
- Fixed bug #51190 (ftp_put() returns false when transfer was successful).
|
||||
(Ilia)
|
||||
- Fixed bug #51176 (Static calling in non-static method behaves like $this->).
|
||||
|
@ -166,7 +166,14 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC)
|
||||
memcpy(val->data, dbdata(H->link, i+1), val->len);
|
||||
val->data[val->len] = '\0';
|
||||
break;
|
||||
|
||||
case SQLMONEY:
|
||||
case SQLMONEY4:
|
||||
case SQLMONEYN: {
|
||||
DBFLT8 money_value;
|
||||
dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, val->len);
|
||||
val->len = spprintf(val->data, 0, "%.4f", money_value);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (dbwillconvert(S->cols[i].coltype, SQLCHAR)) {
|
||||
val->len = 32 + (2 * dbdatlen(H->link, i+1));
|
||||
|
Loading…
Reference in New Issue
Block a user