Thread: insert cast
View Single Post
Old 05-28-2010, 02:41 PM   #4 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 854
Thanks: 32
sketchMedia is on a distinguished road
Default

Can't replicate this unfortunately, I don't have mysqli installed (for whatever reason) on my works dev machine.

Something is rounding it somewhere, I'll bet its mysqli, just try dumping it as a string type I don't think mysql will mind if it has quotes around it or not. Failing that there must be some form of rounding error at mysql's end, try specifiying the mantissa/exponent in the float args:
Code:
ALTER TABLE `stations` MODIFY COLUMN `lat` FLOAT(6,3)  DEFAULT NULL;
ALTER TABLE `stations` MODIFY COLUMN `lon` FLOAT(6,3)  DEFAULT NULL;
If not I'll have to wait to get home and try mysqli on my home web server.
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following User Says Thank You to sketchMedia For This Useful Post:
nefus (05-28-2010)