Txt file:
942,Nike%27s+cities,2469,2,2,164
316,just+me,820,1,1,286
827,RES+4+GOLD,1523,1,1,214
1171,KnightBlood,1550,1,1,211
1172,athens,2095,2,2,177
The above file are alliances from a game i'm trying to make a tool for the format is the following:
id, name, points, towns, members, rank
In my database i'm storing 3 additional columns:
id, name, points, towns, members, rank, world_server, world_id, date
I've looked around and tried multiple different options/queries but I can't seem to get it to work. My current query, in PHP, is:
"LOAD DATA LOCAL INFILE /path/file.txt
INTO TABLE alliance
FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'
SET world_server = $world[server], world_id = $world[id], date = $curDate"
I get that this is probably a duplicate question but I have searched through stackoverflow, mysql docs, etc... for multiple days now and I don't get what's wrong with my query. I am not getting any error messages either which doesn't help, my database just stays empty.
Hope someone can help, A desperate student.