Re: Working with numbers
| From: | Oliver Heinisch | Date: | Fri, 04 May 2001 06:15:01 +0000 |
| Subject: | Re: Working with numbers | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-51374@lists.php.net to get a copy of this message | ||
At 01:39 04.05.01 -0400, you wrote:
Ok Jennifer lets do some "basics" ;-)
I've done some searching on the php site for more info about double and float etc, but I don't really understand anything I found. Can someone give me an explanation about the difference between decimal, float, double?decimal is a straight number f.e 123456 the size/length of this number belongs to the used hardware/compiler (normally 64bit???) it could be "signed" so it could be -123456 or +123456 float is a number like 123,456 or 0,123456 size/signed see above double is also a number like float but with the double size (normally 128 bit ??)
Should I be using decimal as my column type in the MySQL database or should I be using a different column type?If you want to store float numbers like prices or so you could use float(M,D) where M ist the langth of all numbers and D is the number of the fraction(is that word right) I mean what´s behind the "," . Look in the manual of mysql "datatypes" to get more information about numbers and other interesting datatypes. HTH Oliver