title: Mysql CSV load infile
body: <p>I've got a CSV file with 9 columns and I have a MySQL table with 11 columns.</p>
  
  <p>The CSV file looks like:</p>
  
  <pre><code>col1, col2, col3, col4, col5, col6, col7, col8, col9
  </code></pre>
  
  <p>and the MySQL table looks like:</p>
  
  <pre><code>col1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11
  </code></pre>
  
  <p>I need to get the script to ignore the two erroneous (but required) MySQL columns.</p>
  
  <p>The mysql columns that need to be ignored in the import are: db_id &amp; nice_date =)</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>$sql = 'LOAD DATA LOCAL INFILE "../csvtemp/test.csv" 
          INTO TABLE sample 
              FIELDS TERMINATED BY "," 
              OPTIONALLY ENCLOSED BY """" 
              IGNORE 1 LINES'
  ;
  </code></pre>