Alec

Exact matches on float values are notoriously unreliable - the problem with
the math is that it can often turn out the value at something like :-

123.539999999999999999999999999999999999999

which won't produce an equality match.

For this you would probably better use a DECIMAL field.

Andy

----- Original Message -----
From: "Alec Solway" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 03, 2001 6:51 PM
Subject: Limiting to specific field value of type float


> Hi,
>
> I'm having some trouble with the following:
>
> I have a sample table that has one record where price == 123.54, however
>
> select * from gpl where price=123.54
>
> returns an empty set. If I set price to an integer value that's also in
the
> table, it works. e.g.
>
> select * from gpl where price=500
>
> returns the proper results. price is a column of type float.
>
> TIA.
> Alec Solway
>
>
> ---------------------------------------------------------------------
> 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

Reply via email to