I have a problem with storing numbers with decimals in mysql.
It turns out that to show it in an input I convert the amount to Spanish format with thousands separated by. and decimals for, and I do it like this:
number_format($Precio,2,",",".");
and to store it in mysql I change the, for a point like this:
'".str_replace(",",".",$_POST["Precio"])."'
But I run into the problem when the value has thousands since the answer comes with a. separating the thousands with what if the value is 1,000,30 saves me 1.00 in mysql.
I thought about deleting the. with str_replace before changing the, for a point, but I find a solution a little dirty.
Is there any more elegant way to do this?