Re: [PHP] Field type for american money
[email protected] (Daniel Brown)
| Newsgroups | php.general |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jun 11, 2009 at 16:08, revDAVE<[email protected]> wrote: > Php - MySQL - newbie question > > - Field type for american money - int(11) seems to work fine > > - but also I tried decimal(10,2) > > Is one a better choice than another for american money usage? For PHP, check out money_format(), number_format(), and sprintf() with `%0.2f` or similar. For MySQL, ask on the MySQL list. ;-P -- </Daniel P. Brown> [email protected] || [email protected] http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW10000