David Olszyński wrote:
> Hello.
>
> I have a strange problem. Look:
>
> $query = "select id from rates where id = 9500000000000021.0";
> $result = sybase_query($query);
> $a = sybase_fetch_row($result);
> echo $a[0];
>
> This code prints number 9500000000000020.0!!!
>
> The column id is auto-incremented so it always has a unique value. But
> when I select values from this column using php I get a list like this:
> 9500000000000020.0
> 9500000000000020.0
> 9500000000000022.0
> 9500000000000024.0
> 9500000000000024.0
> 9500000000000024.0
> ...,
> while doing the same query from isql or from perl DBI I get correct
> values: 9500000000000020
> 9500000000000021
> 9500000000000022
> 9500000000000023
> 9500000000000024
> 9500000000000025
> ...
>
> Can anyone help me with this?
>
> I use PHP 4.0.4pl1 (./configure --with-mysql --with-apache=../apache
> --enable-track-vars --enable-trans-sid) compiled in Apache/1.3.19, Linux
> 2.4.2 SMP, Sybase 11.9.2.4, RedHat 7.0.
>
> David Olszynski
>
I couldn't believe it: The problem is that php can't handle such big
numbers! :-O
Damned language! ;-)
David Olszynski
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]