Formatting a float value
You need MySQL's FORMAT function

To round 0.00000123456 to 8 places, run the following within PHP:

mysql&gt; select FORMAT(0.00000123456,8);
+-------------------------+
| FORMAT(0.00000123456,8) |
+-------------------------+
| 0.00000123              |
+-------------------------+
1 row in set (0.00 sec)

mysql&gt;


Give it a Try !!!