shah_ankitb Posted June 20, 2011 Share Posted June 20, 2011 I want primary key with auto increment with 25 digits. Big int is only provides 20.id 25 digits datatype?what data type we can use for this one in mysql phpmyadminData example :- 1234567891234567891234567 Link to comment Share on other sites More sharing options...
justsomeguy Posted June 20, 2011 Share Posted June 20, 2011 You should be able to use decimal(25,0). Link to comment Share on other sites More sharing options...
shah_ankitb Posted June 21, 2011 Author Share Posted June 21, 2011 Not workingCREATE TABLE `abc`.`test` (`id` DECIMAL( 25, 0 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY) ENGINE = InnoDB;MySQL said: Documentation#1063 - Incorrect column specifier for column 'id' i have to define it as auto increment & primary key Link to comment Share on other sites More sharing options...
justsomeguy Posted June 21, 2011 Share Posted June 21, 2011 Auto-increment columns have to be integers, so use an int and set the size to 25. Do some tests to see if you can insert and retrieve values that large. Link to comment Share on other sites More sharing options...
shah_ankitb Posted June 22, 2011 Author Share Posted June 22, 2011 1] MYSQL int has max lengh of 11 & bigint has max length of 20. so it's not working for me2] PHP how can i add this 25 digitsi have3034074002003820000020when i'm doing +1 in to that it gives3.0340740020038E+21i need3034074002003820000021 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.