RE: [PHP] converting a number
| From: | Warren Vail | Date: | Thu, 18 Nov 2004 09:24:54 +0000 |
| Subject: | RE: [PHP] converting a number | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202398@lists.php.net to get a copy of this message | ||
>
> I have a number like 1.0122E9 and I want to convert it into a
> real number in
> a common notation and not in that scientific one (with E).
>
> I have seen that very long numbers are always converted
> automaticly to that
> notation and I need to insert that number in a MySQL database and in that
> case MySQL won't calculate well.
>
> Please tell me how to do that in PHP or in MySQL..
>
Is this what you were thinking of?
$query = "insert table(floatcol) values(".sprintf("%2.4f",$yourno).")
";