Reputation: 1930
I want to set the auto increment value to some value.
I user phpMyAdmin to manage database.
but in the operations tab under the sub heading table options that field is missing.
Table structure is as follows
CREATE TABLE IF NOT EXISTS `users` (
`uid` int(10) unsigned NOT NULL COMMENT 'Primary Key: Unique user ID.',
`name` varchar(60) NOT NULL DEFAULT '' COMMENT 'Unique user name.',
`pass` varchar(128) NOT NULL DEFAULT '' COMMENT 'User’s password (hashed).',
`mail` varchar(254) DEFAULT '' COMMENT 'User’s e-mail address.',
`theme` varchar(255) NOT NULL DEFAULT '' COMMENT 'User’s default theme.',
`signature` varchar(255) NOT NULL DEFAULT '' COMMENT 'User’s signature.',
`signature_format` varchar(255) DEFAULT NULL COMMENT 'The filter_format.format of the signature.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'Timestamp for when user was created.',
`access` int(11) NOT NULL DEFAULT '0' COMMENT 'Timestamp for previous time user accessed the site.',
`login` int(11) NOT NULL DEFAULT '0' COMMENT 'Timestamp for user’s last login.',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'Whether the user is active(1) or blocked(0).',
`timezone` varchar(32) DEFAULT NULL COMMENT 'User’s time zone.',
`language` varchar(12) NOT NULL DEFAULT '' COMMENT 'User’s default language.',
`picture` int(11) NOT NULL DEFAULT '0' COMMENT 'Foreign key: file_managed.fid of user’s picture.',
`init` varchar(254) DEFAULT '' COMMENT 'E-mail address used for initial account creation.',
`data` longblob COMMENT 'A serialized array of name value pairs that are related to the user. Any form values posted during user edit are stored and are loaded into the $user object during user_load(). Use of this field is discouraged and it will likely disappear in a future...',
PRIMARY KEY (`uid`),
UNIQUE KEY `name` (`name`),
KEY `access` (`access`),
KEY `created` (`created`),
KEY `mail` (`mail`),
KEY `picture` (`picture`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores user data.';
But for other databases in the same server i can see this options.
Can somebody tell why it is missing?
Upvotes: 0
Views: 1073
Reputation: 40021
I don't know if there is way to add auto_increment through operations but if you go to the structure of a table, select change on the column you wish to change, there is a checkbox named a_i that indicates auto_increment. Check that and press save and your column will have auto_increment.
Upvotes: 1