So I'm doing this to import and unzip a text file:
cd www/tw/data/9 && rm village.txt.gz ; wget http://en9.tribalwars.net/map/village.txt.gz && rm village.txt ; gunzip village.txt.gz
And then to put it into a database I tried this but it failed:
$connection = mysql_connect("*********","********","*********");
mysql_select_db("********", $con);
mysql_query("TRUNCATE `village9`");
$load = mysql_query("LOAD DATA LOCAL INFILE '../data/9/village.txt' INTO TABLE `village9` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (id, name, x, y, owner, points, rank)");
if (!$load) {
die('Invalid query: ' . mysql_error());
}
Anyone see the problem?