2012-07-15 2 views
0

다음 오류가 발생합니다.데이터베이스에 데이터를 삽입 할 때 중복 입력 오류가 발생했습니다.

모든 솔루션? 이미 데이터베이스를 7 개로 분할했습니다. 그리고 이것은 내가 업로드하는 데 문제입니다 마지막 부분입니다 :

SQL 쿼리 :

MySQL이 나에게 오류를 제공
INSERT INTO `smf_themes` (`id_member`, `id_theme`, `variable`, `value`) 
VALUES (17376, 1, 'cust_fbc_pro', ''), 
     (17377, 1, 'display_quick_reply', '1'), 
     (17377, 1, 'cust_twitter', 'aocsujbujp'), 
     (17377, 1, 'cust_fbc_pro', 'http://snapbird.org/'), 
     (17378, 1, 'display_quick_reply', '1'), 
     (17378, 1, 'cust_twitter', ''), 
     (17378, 1, 'cust_fbc_pro', ''), 
     (17379, 1, 'display_quick_reply', '1'), 
     (17380, 1, 'display_quick_reply', '1'), 
     (17380, 1, 'cust_twitter', ''), 
     (17380, 1, 'cust_fbc_pro', ''), 
     (17381, 1, 'display_quick_reply', '1'), 
     (17381, 1, 'cust_twitter', ''), 
     (17381, 1, 'cust_fbc_pro', ''), 
     (17382, 1, 'display_quick_reply', '1'), 
     (17382, 1, 'cust_twitter', ''), 
     (17382, 1, 'cust_fbc_pro', ''), 
     (17383, 1, 'display_quick_reply', '1'), 
     (17383, 1, 'cust_twitter', 'cymjemqpmo'), 
     (17383, 1, 'cust_fbc_pro', 'http://www.viddyou.com/'), 
     (17384, 1, 'display_quick_reply', '1'), 
     (17384, 1, 'cust_twitter', 'izehcnqmsj'), 
     (17384, 1, 'cust_fbc_pro', 'http://www.yourkindatv.com/ 
     [...] 

:

#1062 - Duplicate entry '1-17403-cust_twitter' for key 'PRIMARY'

답변

1
#1062 - Duplicate entry '1-17403-cust_twitter' for key 'PRIMARY' 

삽입하려고이 간단한 방법 데이터 중복.

`id_member`, `id_theme`, `variable` 

그래서,이 문제를 해결하여 입력 SQL을 확인하고 중복 데이터를 제거하거나 기본 키 사양을 수정 : 주요 지수는 3 열입니다.

관련 문제