I have three fields in the database table(serial_no,arrive_date,written_date).My problem is if serial_no and arrive_date already exist in the database, it show say"data already exist". Though serial_no and arrive_date already exist but with a different written_date, then the data should be inserted into the database.
ID Serial_no Arrive_date Written_date
1 ABC 05/05/2014 04/05/2014 --->this is an already existing data
2 ABC 05/05/2014 05/05/2014 --->this is what i want.Though the same Serial_no and Arrive_date but different written_date. Thanks in advance