我有一个自动递增的 mysql 表。我使用 id 作为主键。
这是键的结构:: id int(255) 否 无 AUTO_INCREMENT
增量是这样发生的:
如您所见,xxxxxxxxYY 系列,只有 YY 数字递增。
这是插入语句。
$id = $this->get_next_id($this->get_last_id());
$q = 'INSERT INTO '.URL_TABLE.' (id, url, date, title, image, description)
VALUES ("'.$id.'", "'.$url.'", NOW(), "'.$title.'", "'.$image.'", "'.$description.'")';