title: Limit input rows with LOAD DATA INFILE in MySQL
body: <p>So, here is my question. I have csv file with 130.000 rows (give or take) and I was wondering if it is possible to somehow limit input to only first two rows? I did manage to successfully import file using this block of code:</p>
  
  <pre><code>$sql = "LOAD DATA LOCAL INFILE 'http://localhost/00_VJEZBA/ROK_DEUTCH/csv/wlan_search.txt'
  INTO TABLE `test_rok`
  FIELDS TERMINATED BY ';'
  LINES TERMINATED BY '\n'
  (`update_time`,`gefundener`,`conn`,`dbm`,`kod`,`kod`,`mhz`,`value_1`,`value_2`,`value_3`,`dbm_2`)";
  
  $db = connectPDO();
  
  $stmt = $db-&gt;prepare($sql);
  
  $stmt-&gt;execute();
  </code></pre>
  
  <p>and adding </p>
  
  <p><code>[PDO::MYSQL_ATTR_LOCAL_INFILE =&gt; true]</code> into my connection</p>
  
  <p>and as I said, it works fine but I was wondering is it possible to somehow limit input data? I've read somewhere that it can't be done with <code>LOAD DATA LOCAL INFILE</code> what's my alternative on that matter?</p>