title: CSV to Mysql import script to match fields
body: <p>Is there such a script out there or way of importing data from a CSV into mysql that can match the first field so instead of overwriting data will just update missing fields or values in rows? Hope I have explained myself clearly enough!</p>
  
  <p>Example:</p>
  
  <pre><code>1,john,doe,programmer
  2,jane,doe,accountant
  3,judy,doe,manager
  1,john,doe,cto
  </code></pre>
  
  <p>Assuming the first field is an ID, I want the script to insert when a record does not exist but update when the ID already exists, so John Doe would first get inserted as a programmer, but then updated to be a CTO.</p>