OK, I figured it out. You're relying on $LocaleInfo["mon_thousands_sep"] and $LocaleInfo["mon_decimal_point"] to fix the value for MySQL. localeconv() on my server returns following array (currency/monetary values aren't set, no idea why): Array
(
[decimal_point] => .
[thousands_sep] =>
[int_curr_symbol] =>
[currency_symbol] =>
[mon_decimal_point] =>
[mon_thousands_sep] =>
[positive_sign] =>
[negative_sign] =>
[int_frac_digits] => 127
[frac_digits] => 127
[p_cs_precedes] => 127
[p_sep_by_space] => 127
[n_cs_precedes] => 127
[n_sep_by_space] => 127
[p_sign_posn] => 127
[n_sign_posn] => 127
[grouping] => Array
(
)
[mon_grouping] => Array
(
)
)
So I changed:
$floatString = str_replace($LocaleInfo["mon_decimal_point"] , ".", $floatString); $floatString = str_replace($LocaleInfo["mon_thousands_sep"] , "", $floatString);
To:
$floatString = str_replace($LocaleInfo["decimal_point"] , ".", $floatString); $floatString = str_replace($LocaleInfo["thousands_sep"] , "", $floatString);
Now it seems to work fine.