freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: L J Bayuk <lbayuk AT mindspring.com>
- To: freetds AT lists.ibiblio.org
- Subject: Re: [freetds] Strange issue with PHP
- Date: Tue, 18 Mar 2003 20:25:07 -0500 (EST)
John wrote:
> I have a question for any of you PHP people to mull over if you have a
> minute. Server specs are as follows:
>
> - Intel hardware / Linux Kernel 2.4.18-24.7.x
> - PHP 4.3.1
> - FreeTDS 0.61
> - Apache 1.3.27
>
> The problem is demonstrated in this very basic script:
> ...
>
> As you can see, the issue is that the numbers being retrieved from the
> database are truncated to the decimal point (all except the number in the
> first row of the array, which is truncated to digits to the right of the
> decimal point.) At the second URL above
> (http://www.superproducts.com/test2.php) the numbers are not truncated -
> they extend to four digits beyond the decimal point, and this is the way it
> *should* look.
You don't say what PHP module you are using, but you have exactly described
a bug in the sybase_ct module in PHP 4.3.x. The first float row is OK, and
rows after are truncated. When I went to report this as a bug about 2
months ago, I found it was already fixed in PHP's CVS, although it wasn't
in the bug database. You can grab the sybase_ct.c file off PHP's cvs server
and rebuild PHP with that. (Get file version 1.77 or higher, which has the
fix: ""Do not 'convert' double columns to integers after the 1st row in the
resultset".) There is a 1-line patch to fix it, but you are better off
getting the updated source file.
-
[freetds] Doxygen,
James K. Lowden, 03/18/2003
-
[freetds] Strange issue with PHP,
John, 03/18/2003
- Re: [freetds] Strange issue with PHP, Frediano Ziglio, 03/18/2003
- Re: [freetds] Strange issue with PHP, L J Bayuk, 03/18/2003
-
[freetds] Strange issue with PHP,
John, 03/18/2003
Archive powered by MHonArc 2.6.24.