mysql inserting decimal value with perl loses precision
- From: myrose.20.ftumsh@xxxxxxxxxxxxxxx (Myrose 20 Ftumsh)
- Date: Fri, 14 Mar 2008 09:50:15 +0000
Lo,
This is more for the archives than anything as there is a workaround.
When inserting 1234567890.123456 into a decimal(16,6) column, the value stored is 1234567890.123460
Having a brainwave from the Time::HiRes docs,
sprintf('%.6f', 1234567890.123456) stores the expected value.
Is this expected behaviour or should DBD::mysql automagically do the right thing?
John
.
- Follow-Ups:
- Re: mysql inserting decimal value with perl loses precision
- From: Peter J. Holzer
- Re: mysql inserting decimal value with perl loses precision
- Prev by Date: Re: perl DBI on windows 64
- Next by Date: Re: perl DBI on windows 64
- Previous by thread: perl DBI on windows 64
- Next by thread: Re: mysql inserting decimal value with perl loses precision
- Index(es):