Demonic Posted May 5, 2008 Share Posted May 5, 2008 I was looking at this chart and it said length, to make sure I'm correct int(10) can only store a number of the length of 10: like 9,999,999 is the highest number that can be stored? [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/104219-field-types-question/ Share on other sites More sharing options...
rhodesa Posted May 5, 2008 Share Posted May 5, 2008 As far as I know, the 'length' specified after INT is only the width of the display column when running a query from the command line. It has no bearing on min/max values. Link to comment https://forums.phpfreaks.com/topic/104219-field-types-question/#findComment-533570 Share on other sites More sharing options...
Demonic Posted May 5, 2008 Author Share Posted May 5, 2008 Alright I think I understand what you are saying. Link to comment https://forums.phpfreaks.com/topic/104219-field-types-question/#findComment-533574 Share on other sites More sharing options...
rhodesa Posted May 5, 2008 Share Posted May 5, 2008 I was correct. To confirm I created the following table with one record: CREATE TABLE `test` ( `foobar` INT( 3 ) NOT NULL ); INSERT INTO `skeeter`.`test` (`foobar`) VALUES ('999999'); and was able to select the correct value back out of the table Link to comment https://forums.phpfreaks.com/topic/104219-field-types-question/#findComment-533579 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.