James Smith wrote: >>>>> INSERT INTO barcodes (Barcode, ItemID) VALUES (0008811953928,17870) >>>>> >>>>> Could anyone tell me why the number 0004294967295 is causing an error >>>>> when the SQL statement doesn't even show it being used? >>>> >>>> Because it is 2^32. Instead of throwing an error MySQL just rounds >>>> your value to the maximum that fits in the field. >>> >>> But the field is INT(13), why would a 13 digit number not fit? >> >> Because display padding has got nothing to do with physical >> storage: http://dev.mysql.com/doc/mysql/en/Numeric_types.html > > Bigint fixed it, thanks. Any idea why the DB allows an INT(13)?
I have no idea why MySQL does things the way it does. I can rant a long time about why what MySQL is doing is wrong :-) You might want to read http://sql-info.de/mysql/gotchas.html Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183299 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

