|
Posted by The Natural Philosopher on 02/01/08 16:12
The Natural Philosopher wrote:
>
> The question says it all.
>
> I have an input box, which I fill in with a price.
> IOt gets passed to the main form as a variable, then shoved into an SQL
> field vue a print '%d' statement where the argument is $sale_price*100.
>
> For some reaosn, this particular value goes to 6998.
>
> If I update hee database manually to 6999, it displays as 69.99.
>
> If I enter 69.999 it updates as 6999..not 69999
>
> I must be doing something really dumb here..
Its even weirder.
I put in some checks:
echo $sale_price gives me 69.99
Echo ($sale_price*100) gives me 6999
But printf ("%d",$sale_price*100);
gives me 6998!!!
WTF is going on?
Navigation:
[Reply to this message]
|