Hi all,
I'm trying to store a price in MySQL as a float. When I look at the value in PHPMyAdmin the values look fine.. 4.1, 7.25 etc. When I read the value in from the database and print it, it always comes out as:
1028.504.74.54.4002000074.55.575.575.5777777.52022224.9501.259.5922.511.6513.52873.53.516.53339.755.52.32225.56.751220
despite the value in the database. I'm not really sure what's going on. If this helps, the code I'm using to call it in from the database and print the value is:
for ($i=0; $i < mysql_num_rows($result); $i++) {
$myrow = mysql_fetch_array($result);
echo $myrow['UnitPrice'];
}
Where UnitPrice is a field of float value in MySQL.
Any help or a point in the right direction would really be appreciated!
Cheers,
Richard.