I am trying to select some values from mysql with the next sentence:
SELECT
id, lead_id, form_id, field_number, value
FROM
wp_rg_lead_detail
WHERE
field_number IN (6.3, 6.6, 11, 12, 17, 14)
ORDER BY
lead_id, field_number
the field field_number is a float and the select is listing just the 11, 12, 17 and 14 fields but not values from the 6.3 and 6.6
What is wrong with the sentence?
Thanks.
There is nothing wrong with the query. The problem is that
floatis not precise type. Usedecimalinstead (or change the query to something like... WHERE (field_number BETWEEN 6.2999 AND 6.3001) OR (field_number BETWEEN 6.5999 AND 6.6001 OR ()...)