RE: converting a number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>
> 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).") ";

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux