Hi, Iam trying to insert data from a .txt file into my sql database but iam not very good at writing code. could someone please tell me where my code is wrong in the query, iam thinking its probably just a , or " in the that needs adding or taking away but i don't know. your help will be grately appreciated.
//(1) open the database connection and use the *****
$connection = mysql_connect("server","DB","password");
mysql_query("LOAD DATA INFILE 'beach.txt' INTO TABLE gbg_grade
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'");
//(2) close the database connection