php - How to import a csv file to mysql -
hello i'm trying import csv file update's every 12 hours.
the format http://pastebin.com/htkft2af
my code this
// fastest way load large amounts of data mysql
$sql = "load data infile '$filename' table `cyberst_csgo`.`items` fields terminated '\t' lines terminated '\n'";
i want take example ak-47 | aquamarine revenge (battle-scarred) , sent in table cyberst_csgo query "name" , 21.53 in query "cost" , 1436821250 query "lastupdated"
any idea how it?
it has chance of working ultimately. facing timeout @ php side of things.
if case options include
a. my.cnf
change such as
wait_timeout = 3600 interactive_timeout = 3600
you're on hook actual values. , mysql restart.
b. connection-level not mysql server level tweaking of time-out
c. smaller batches import not massive 1tb file
Comments
Post a Comment