MySQL Forums
Forum List  »  PHP

Precision of "float" type
Posted by: David
Date: February 22, 2006 06:38AM

Hi,

I was wondering about the true precision of the float variable type in MySQL and in PHP.

1. If I declare a MySQL field to be of type "Float(9,6)", will MySQL automatically preserve the precision of the data (i.e. 6 digits after the decimal point) or should I declare it as a "Double"?

2. When reading&writing the above field with PHP, is there a difference between float or double or shouldn't I worry about any loss of precision?

Thanks

David.

Options: ReplyQuote


Subject
Written By
Posted
Precision of "float" type
February 22, 2006 06:38AM
February 22, 2006 02:31PM
February 23, 2006 04:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.