RE: [PEAR-DEV] mdb decimal types
| From: | Lukas Smith | Date: | Thu, 27 Mar 2003 08:28:35 +0000 |
| Subject: | RE: [PEAR-DEV] mdb decimal types | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-14657@lists.php.net to get a copy of this message | ||
> From: Alan Knowles [mailto:alan@akbkhome.com]
> Sent: Thursday, March 27, 2003 8:49 AM
> To: Lukas Smith; pear-dev
> Subject: [PEAR-DEV] mdb decimal types
>
> Just having a look through the decimal handling in mdb
>
> for mysql and postgres it appears to be mapping decimals to integers
> then doing a bit of maths in PHP to 'get' it out again.
>
> mysql has decimal (5,2)
> postgres has numeric(5,2)
>
> It would be far better to use these for cash calculations (unless mdb
> wants to start using bcmath to do the calcs.?)
>
> Thoughts?
So far I have left the native datatypes to be exactly what metabases
uses. Manuel usually makes very educated decisions. However the times do
change and so some decision might make sense to be reconsidered.
Usually these types of decision were made by Manuel to ensure 100%
portability across RDBMS and across RDBMS versions.
For now I want to wait until we have the driver set complete (and maybe
the unit tests) before making any such changes, so that we can better
see the implications.
Regards,
Lukas