我有一個數據庫,電視週刊和表的自動遞增這些值:觸發重新設定在phpMyAdmin
id bigint 255 UNSIGNED AUTO_INCREMENT
programme varchar 255
default value (which is from another table
with list of programs, the only linked field that
is shared with other table):<b><a href="gossipgirl.php">Gossip Girl</a></b>
channel varchar 255
airdate DATETIME - actual airtime
displayair DATETIME (rounded-up datetime, e.g. programme that airs 1.59pm
would be shown as 2.00pm, or 6.08pm as 6.10pm)
expiration DATETIME - when program finishes
episode VARCHAR 255 NULL - has null option if episode unknown
series VARCHAR 255
epno VARCHAR 255 - episode number
setreminder VARCHAR255 (shows "set reminder", sends email to user, but that's
another thing to work on).
我想插入觸發到我的數據庫,這樣,如果一個記錄被刪除,ID自動增量自動重新設置?
有關如何完成此任何想法?到目前爲止,我已經手動完成了它,但是我正在查看當我刪除記錄時使用phpMyadmin可以執行的操作。
順便說一句,我做了一個表的副本備份的目的。
謝謝
您不必重置自動增量,只是讓它增長... – ajreal 2010-12-02 18:17:02