I have a database with the following fields
id | pc | des | qty | who | condition | notes
I need to be able to upload a csv file via a web page,
the file then needs to be processed and perform the following functions.
compare the pc and who fields.
If there is a match i want it to take the quantity (qty) from the csv and ADD it to the quantity in the relevant DB row, NOT REPLACE IT so if the csv qty = 2 and the db qty = 5 the script should update the row to be 7.
If there is no match I would like it to insert a whole new row with the data from the CSV.
Once it has recieved and processed the CSV file a report of what was added and what was updated should be displayed.
I would like this fairly quickly and preferably fairly cheaply too.