Page 2 of 2
Re: Why doesn't mysql allow *apostrophies* into fields?
Posted: Mon Jul 20, 2009 12:59 pm
by simonmlewis
Yes, it's the last time.
It's collated, then used the output into the mysql query.
Just odd that it works on the test page, but not here.
There is no other part to it, except for when $price is used in the update query.
Re: Why doesn't mysql allow *apostrophies* into fields?
Posted: Mon Jul 20, 2009 1:31 pm
by simonmlewis
The field type is an INT.
I've replaced it with your code, but still it isn't altering anything.
Re: Why doesn't mysql allow *apostrophies* into fields?
Posted: Mon Jul 20, 2009 1:41 pm
by simonmlewis
Ok.... it did work, sort of.
I had an escape string that killed it.
But now it is rounding it up.
13997.56 becomes 13998.

Re: Why doesn't mysql allow *apostrophies* into fields?
Posted: Mon Jul 20, 2009 1:59 pm
by simonmlewis
Bingo - thx.
Never knew about float 8,2.
Re: Why doesn't mysql allow *apostrophies* into fields?
Posted: Mon Jul 20, 2009 4:42 pm
by Weirdan
For prices and other values involving money I'd recommend decimal - it's exact format and calculations involving it do not tend to loose precision (unlike float).