This is bugging me for some time now. I would love some advise.
Here is the situation:
I have my Contacts table in my database. And using a CSV file, I need to import more people into this table time to time. The problem is, how would you check to see whether you already have the record in the Contacts table? If so, how would you update the record's some or all fields(basically the fields need to be updated) based on the record in the CSV file.
This actually gets more complicated when the Companies table gets into the picture. If you have a record in the CSV file which has a company not in the database yet, how would you tell it to create that company, and use that company's id# to add into that record in the Contacts table.
I can elaborate this as I get your questions. But right now, I can't logically think of any way of doing this with just using MySQL. It feels like it has to have a PHP script to handle such a job. And I don't know that script.