|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-11-05 03:53 UTC] thies at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
This problem exists in 3.0.3 and 3.0.5 and probably other versions. Sybase versions tested were 11.0.3 and ASE 11.5.1 running on AIX 4.3 and Digital Unix 4.0d. PHP was running as an apache (1.3.3) module on AIX 4.3 on 64-bit hardware. The following patch fixes the problem for me, but someone else probably needs to try it out to make sure I didn't break something else. *** php3_sybase.h Sun Oct 4 20:22:42 1998 --- php3_sybase.h.new Wed Oct 21 11:43:37 1998 *************** *** 91,96 **** --- 91,97 ---- #define anyintcol(j) (coltype(j)==SYBINT4?intcol(j):(coltype(j)==SYBINT2?small intcol(j):tinyintcol(j))) #define charcol(i) ((DBCHAR *) dbdata(sybase_ptr->link,i)) #define floatcol(i) ((float) *(DBFLT8 *) dbdata(sybase_ptr->link,i)) + #define realcol(i) ((float) *(DBREAL *) dbdata(sybase_ptr->link,i)) typedef struct sybase_link_struct sybase_link; *** sybase.c Sun Oct 4 20:23:05 1998 --- sybase.c.new Wed Oct 21 11:43:01 1998 *************** *** 626,634 **** result->type = IS_STRING; break; } ! /*case SYBFLT8:*/ ! case SYBREAL: { result->value.dval = (double) floatcol(offset); result->type = IS_DOUBLE; break; } --- 626,637 ---- result->type = IS_STRING; break; } ! case SYBFLT8: result->value.dval = (double) floatcol(offset); + result->type = IS_DOUBLE; + break; + case SYBREAL: { + result->value.dval = (double) realcol(offset); result->type = IS_DOUBLE; break; }