go ahead... be a heretic | |
PerlMonks |
OT: Retrieve float number from mysql dbby Anonymous Monk |
on Oct 16, 2015 at 11:48 UTC ( [id://1145098]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question: I have a field in my mysql table type float When I read it with my $sth = $dbh->prepare("SELECT filed FROM table WHERE id = 1"); I get the value 1679970 when I check the database "SELECT filed FROM table WHERE id = 1" I also get 1679970 But when I check it with "SELECT format(filed,3) FROM table WHERE id = 1" I get 1679971.000 I do know that the value is in fact 1679971 because I inserted the record myself And if I retrieve the value with a php script I get 1679971 Any idea why? How can I get the right value 1679971?
Back to
Seekers of Perl Wisdom
|
|