MySQL float values jumping around on insert?
Posted
by dubayou
on Stack Overflow
See other posts from Stack Overflow
or by dubayou
Published on 2010-04-27T20:42:31Z
Indexed on
2010/04/27
20:43 UTC
Read the original article
Hit count: 250
So i have a SQL table setup as such
CREATE TABLE IF NOT EXISTS `points` (
`id` int(11) NOT NULL auto_increment,
`lat` float(10,6) NOT NULL,
`lng` float(10,6) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM;
And im inserting stuff like
INSERT INTO `points` (`lat`, `lng`) VALUES ('89.123456','-12.123456');
Gives me a row with lat and lng being 89.123459 and -12.123455
Whats up?
© Stack Overflow or respective owner