我將用戶「root」連接到我本地進行開發的數據庫「test」上。其中我有表「評級評論」。出於某種原因,當我點擊表「ratingcomment」 phpMyAdmin的顯示我下面的錯誤:phpMyAdmin:MySQL錯誤1062 - 重複條目
Fehler
SQL-Befehl:
INSERT INTO `phpmyadmin`.`pma_history` (
`username` ,
`db` ,
`table` ,
`timevalue` ,
`sqlquery`
)
VALUES (
'root', 'test', 'ratingcomment', NOW() , 'SELECT * FROM `ratingcomment`'
)
MySQL meldet:
#1062 - Duplicate entry '838' for key 'PRIMARY'
我用谷歌來FINDE了以下
"This indicates that you have a UNIQUE or PRIMARY index on a table, and there is a duplicate value someone on one of the values in one of these indexes."
但是我還是不太明白的錯誤!我使用一個主鍵,它可以爲我的所有表自動遞增,所以實際上不應該對錶有問題。我有另一個名爲「評級」的表,其中有一列「評論」。這是否會導致問題?
桌子的主要用途是什麼?使用主鍵查詢記錄838並查看將值與您正在嘗試「插入」的值進行比較。 – 2010-12-02 17:18:57