nysebamse Posted August 29, 2003 Share Posted August 29, 2003 When inserting this integer: 000050007000003 from a form in php this is how it looked after being inserted: 000004294967295. This is the structure of the table: CREATE TABLE `kundekort_prosjekt_relation_kundekort` ( `id` int(11) NOT NULL auto_increment, `prid` int(11) NOT NULL default \'0\', `kid` int(15) unsigned zerofill NOT NULL default \'000000000000000\', PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=10 ; I\'ve even tried inserting 000050007000003 manually with phpMyAdmin with the same result as described above. Anyone has any suggestions to why this is occuring? Im pretty close to start chewing on my fist.. :evil: Link to comment https://forums.phpfreaks.com/topic/956-extremely-weird-int-handling/ Share on other sites More sharing options...
shivabharat Posted August 29, 2003 Share Posted August 29, 2003 Use a Big INT CREATE TABLE `kundekort_prosjekt_relation_kundekort` ( `id` int(11) NOT NULL auto_increment, `prid` int(11) NOT NULL default \'0\', `kid` bigint(15) unsigned zerofill NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM AUTO_INCREMENT=10; Because INT range is -2147483648 to 2147483647. Hope this helps Link to comment https://forums.phpfreaks.com/topic/956-extremely-weird-int-handling/#findComment-3229 Share on other sites More sharing options...
nysebamse Posted August 29, 2003 Author Share Posted August 29, 2003 Thanks for your help It worked great Link to comment https://forums.phpfreaks.com/topic/956-extremely-weird-int-handling/#findComment-3230 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.