Why is MySQL is returning some floats in scientific notation, but not others?

Viewed 3624

I'm writing a PHP script that looks through a DB table of float values, that tend to be somewhat small, such as:

0.00052
0.00134
0.00103
0.00149
0.00085
0.00068
0.00077
0.00088
0.00169
0.00063

For reasons unknown to me, some values appear in the DB in scientific notation, such as:

1.12305e-06

The table is set to float, and I've tried all manner of functions in PHP to force the numbers to display as decimal, to no avail. Try as I might, I'm unable to get this table of numbers to be consistently decimal in all cases.

Any suggestions on how to resolve this? Have tried typcasting to (float) and using number_format() and several other options, but no change every time.

2 Answers
Related