Forum Moderators: open

Message Too Old, No Replies

mysql float field with value of 25 comes into php as string '250'

         

pixeltierra

3:33 pm on Oct 11, 2007 (gmt 0)

10+ Year Member



Like I said, I have a mysql float field with value of 25 that comes into php as string '250'. I want to do a calculation with this value, which actually represents a price. The mysql field is a float, with no precision specified.

Obviously $250 is different than $25. I'd rather not do type conversion on this field, to completely avoid any type conversion errors/quirks so I want it to come as a number automatically to php.

I'm not sure what I'm doing wrong or how to fix it. Ann suggestions?

pixeltierra

5:50 pm on Oct 11, 2007 (gmt 0)

10+ Year Member



Never mind. I fixed the issue. It seems the problem was me!

Admin folks: you can delete this thread, it won't help anyone.