2013-04-11 76 views
0

嘿傢伙我有一個數據庫中重複條目的錯誤。 。而數據可以duplicate..error就像在MySQL重複條目錯誤 - codeigniter

Duplicate entry 'Years-1' for key 'term_type'

插入碼是

INSERT INTO tbl_investment (member_id, investment_type, scheme_name, term, term_type, receipt_count, `investment_amount`, investment_date, maturity_amount, maturity_date) 
VALUES ('162', 'RD', 'hgyuuy', '2', 'Years', '1', '15000', '2013-04-11', '1000', '2013-04-11')` 
+3

term_type被設置爲唯一,因此輸入具有相同值的多行是不可能的,因此錯誤! – ITroubs 2013-04-11 13:56:27

回答

1

term_type被設置爲唯一的,這樣輸入查詢具有相同值的多個行是不可能的這樣的錯誤!

+0

但所有的領域都是uniqe,那麼爲什麼在其他領域不會出現這樣的錯誤。 。 @iTroubs – Jay 2013-04-12 04:17:13