Jay
Jay

Reputation: 402

duplicate entry error in mysql - codeigniter

hey guys i have an error of duplicate entry in database . . whereas data can be duplicate..error is like

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

the insert code is

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')`

Upvotes: 0

Views: 806

Answers (1)

ITroubs
ITroubs

Reputation: 11215

term_type is set as unique so inputing multiple rows with the same value is impossible thus the error!

Upvotes: 1

Related Questions