php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #65690
Patch php5-bug65690.patch revision 2013-09-17 13:15 UTC by slavb18 at gmail dot com

Patch php5-bug65690.patch for PDO Firebird Bug #65690

Patch version 2013-09-17 13:15 UTC

Return to Bug #65690 | Download this patch
Patch Revisions:

Developer: slavb18@gmail.com

--- ext/pdo_firebird.orig/firebird_statement.c	2013-09-09 11:02:50.000000000 +0400
+++ ext/pdo_firebird/firebird_statement.c	2013-09-17 16:39:15.000000000 +0400
@@ -341,7 +341,9 @@
 				
 			*ptr = FETCH_BUF(S->fetch_buf[colno], char, CHAR_BUF_LEN, NULL);
 			
-			if (n >= 0) {
+			if((var->sqltype & ~1)==SQL_DOUBLE) {
+				*len = slprintf(*ptr, CHAR_BUF_LEN, "%.*F" , -var->sqlscale, *(double*)var->sqldata);
+			} else if (n >= 0) {
 				*len = slprintf(*ptr, CHAR_BUF_LEN, "%" LL_MASK "d.%0*" LL_MASK "d", 
 					n / f, -var->sqlscale, n % f);
 			} else if (n <= -f) {
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 15:01:30 2024 UTC