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:
$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 '
'
(`update_time`,`gefundener`,`conn`,`dbm`,`kod`,`kod`,`mhz`,`value_1`,`value_2`,`value_3`,`dbm_2`)";
$db = connectPDO();
$stmt = $db->prepare($sql);
$stmt->execute();
and adding
[PDO::MYSQL_ATTR_LOCAL_INFILE => true]
into my connection
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 LOAD DATA LOCAL INFILE
what's my alternative on that matter?