It's a bug either in your processor or in your distribution
libraries. Your SELECT returns correctly on my Linux and FreeBSD
servers.
-Tilghman
--
"There cannot be a crisis today. My schedule is already full."
--Henry Kissinger
> -----Original Message-----
> From: Federico Giannici [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 09:09
> To: MySQL mailinglist
> Subject: Bug converting string into integer
>
>
> In a SELECT I have to convert a string into a number.
>
> I used to use something like 'string'+0, where 'string' is a string
> rapresentation of an integer.
>
> Now I noticed that in many cases it returns a rounded
> floating point!!!
>
> For example:
>
> mysql> select '11'+0;
> +-----------------+
> | '11'+0 |
> +-----------------+
> | 10.999999046326 |
> +-----------------+
> 1 row in set (0.00 sec)
>
>
> Is it normal? Or it happens only in my system? (OpenBSD 2.8 i386)
>
> What is the best (more efficient) way to convert an integer
> string to an
> integer value?
>
>
> Thanks,
> ___________________________________________________
> __
> |- [EMAIL PROTECTED]
> |ederico Giannici http://www.neomedia.it
> ___________________________________________________
>
> ---------------------------------------------------------------------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php