I am trying to do a SELECT
match on a table based upon an identifier and a price, such as:
SELECT * FROM `table` WHERE `ident`=\'ident23\' AND `
Perhaps something along these lines:
SELECT * FROM table WHERE ident='ident23' AND ABS(price - 101.31) < .01;
It doesn't work because a float is inherently imprecise. The actual value is probably something like '101.3100000000001' You could use ROUND() on it first to round it to 2 places, or better yet use a DECIMAL type instead of a float.