in reply to Getting different results with $var++ and $var += 1
use DBI qw(:sql_types);
...
$sth->bind_param(1, $value, { TYPE => SQL_FLOAT });
Although it probably wasn't your decision, I must also say that storing currency values as floats in databases/spreadsheets is generally a bad idea. Integral types are prefable, i.e. don't store dollars, but cents, 1/10 cents or whatever.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting different results with $var++ and $var += 1
by splicer (Novice) on Dec 03, 2008 at 22:29 UTC | |
by gone2015 (Deacon) on Dec 03, 2008 at 23:38 UTC | |
by jczeus (Monk) on Dec 04, 2008 at 07:37 UTC | |
by JavaFan (Canon) on Dec 04, 2008 at 00:47 UTC | |
by gone2015 (Deacon) on Dec 04, 2008 at 09:23 UTC | |
by Corion (Patriarch) on Dec 04, 2008 at 09:26 UTC | |
|