I have a trouble with a select on a float value
I have a table with a "size" field defined as
FLOAT di 4,1
the value 12.7 is in the "size" field.
Now I write:
$preControllo="
SELECT id
FROM sizes
WHERE size='12.7'
;";
//or size=12.7 ... I have the same results
$eseguiQuery=mysql_query($preControllo) or die ("MySql error: ".mysql_error());
$preNum=mysql_numrows($eseguiQuery);
print "<BR><BR>".$preNum."<BR><BR>";
and the query returns 0 rows.
If I have 12.2
12.3
ecc.
in my table
and i do:
$preControllo="
SELECT id
FROM sizes
WHERE size='12'
;";
(or size=12)
The rows number of the result is the number of decimal values in my table.
IE: if I have 12.2, 12.3, 12.4
The query returns 3 rows.
Can you help me, please?
Please for more info about my problem visit also:
http://www.phpbuilder.com/forum/read.php3?num=5&id=29990&thread=29918