I am having problems loading my .txt file into my MySQL database using PHP. It executes the first query fine and deletes everything in the current table.
Then the second query goes and it grabs the file fine and loads the first row and stops. Any Suggestions? Below is the pasted query that will load my file.
$query=mysql_query("LOAD DATA LOCAL INFILE \"/path/to/file/data.txt\" REPLACE INTO table inventory FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\n\r'")or die("Error Executing the Query");
FYI: I used the same query through phpMyAdmin and it loads the data fine.