Yii主键增加2

Noticed strange thing. In my DB all tables have only odd primary keys.

 id  |  value
  1  |  10
  3  |  15
  5  |  NULL
  7  |  1

In other Yii sites everything ok.

Rows added by different methods and into different tables:

$model = new Tbl1;
$model->value = 10;
$model->save();

and

$command = Yii::app()->db->createCommand();
$sql = 'INSERT INTO `tbl2` SET `value` = 10';
$command->setText($sql);
$command->execute();

This is strange, is it?

In your database server(probably, MySQL) check for the auto_increment_increment and auto_increment_offset variables.

Set these to 1.


Information regarding further commands and actions are listed here.