I have a MySQL Database which contains 2 tables - products & prices. Each week, I need to upload a file (which can be provided in either excel or csv format). Now, this file may contain the same product, but at different prices - and it may have slight alterations in the product name, for example it may have the same product 3 times but with different presentation, like so; - Epson R300 - Epson Stylus Photo R300 - Epson Stylus Photo R300 (1 Yr Warranty) and so on... I need a script to parse and insert these into the database and to recognize similar/identical products, and therefore insert just one record into the 'products' table, yet 3 records in the 'prices' table. The end result I need is that when a user searches for a particular product, it needs to only return a single result for that product, yet still display all 3 prices. (A bit like the way price comparison sites work, if you like). Finally, after the first upload, I will need subsequent uploads/parsing to recognise the existing data, and only update as needed. If there is a better way of dealing with this data, or presenting it etc - I'm all ears!
## Deliverables
Working script that accomplishes the task described above. All code should be well commented.
## Platform
Coldfusion MX7