title: How to avoid duplicate data when using LOAD DATA INFILE
body: <p>This is a continuation on my other question <a href="https://stackoverflow.com/questions/23579701/load-a-csv-file-with-specific-columns-using-pdo/23579859?noredirect=1#comment36188284_23579859">link</a>. </p>
  
  <p>I have a table structure like this:</p>
  
  <pre><code>id
  assigned_by
  assigned_to_user_id
  vendor_id
  receiver_no
  purchase_order_no
  destination
  po_status
  invoice_no
  invoice_amount
  delivery_date
  datetime_done
  latest_jda_sync_date
  latest_mobile_sync_date
  created_at
  updated_at
  deleted_at
  </code></pre>
  
  <p>And the content of my csv file is like this:</p>
  
  <pre><code>vendor_id receiver_no purchase_order_no destination po_status
  30105   20110   10151   9005    3
  50015   20114   10155   9005    3
  </code></pre>
  
  <p>My problem here is that I have a polling/daemon process which pull data and insert them in a csv file. So I know for sure that I'll be getting duplicate data per csv. And I want to avoid that. </p>
  
  <p>I'd read that using IGNORE can do this validation before my data gets inserted but my problem is that my primary key isn't 'id' and the content I'm pulling and storing in the csv file doesn't have the field 'id' in it. </p>
  
  <p>The unique field in my csv is the 'receiver_no' or 'purchase_order_no'. So how do I set the IGNORE command to the po_no or receiver_no. Is this possible? </p>
  
  <p>thanks,</p>