i have a code that lets user uplaod a csv & then insert the values from csv into 2 tables in the MySql DB. it works fine if the student in the csv table are unique & doesn't already exist in the DB.
BUT i want it to work in the following way:
1. if there are student code with the same number (eg 2000), then get only the unique ones from csv before storing into the student_info table
2. if the student code (eg 2000) specified in the csv file already exists in the DB, then be able to match it by retrieving student codes with the unique ones from csv file, & if matched then skip insertion into student_info table & only insert in sitting_data table. But if doesn't match then code will also be inserted in sitting_data table
Is it possible? Can someone please help?