kolobok Posted July 6, 2011 Share Posted July 6, 2011 Hello guys MySQL Server: Localhost via UNIX socket Server version: 5.1.46-1 Protocol version: 10 MySQL charset: UTF-8 Unicode (utf8) Web server nginx/0.7.67 MySQL client version: 5.0.51a PHP extension: mysqli Epty InnoDB latin1_swedish_ci Task is to load data from CSV file in to multiple tables updating fk and filtering duplicates. EX I was looking in to load LOAD DATA INFILE but I am not shure... I will appreciate any input of the solution or point in to the example. Thank you [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/241256-load-data-infile/ Share on other sites More sharing options...
fenway Posted July 7, 2011 Share Posted July 7, 2011 I don't download random files -- but if it's a true CSV file, then the refman says: LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES; Quote Link to comment https://forums.phpfreaks.com/topic/241256-load-data-infile/#findComment-1239379 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.