views:

100

answers:

1

The id field in a mysql table is incrementing by 10 (11, 21, 31) for some reason. Here is the table definition:

CREATE TABLE `clients` (
  `id` int(11) NOT NULL auto_increment,
  `first_name` varchar(255) default NULL,
  `last_name` varchar(255) default NULL,
) ENGINE=InnoDB AUTO_INCREMENT=52 DEFAULT CHARSET=utf8;

If I do a simple insert statement in SQL the next ID will be 41.

+8  A: 

You have auto_increment_increment set to 10, change it back to 1.

+1 Would you know why it starts at 11 when AUTO_INCREMENT is set to 52?
Andomar
My guess would be that you set the AUTO_INCREMENT after already inserting some values, but without your session logs I can't be sure.