I'm loading a simple csv into mysql. This is the csv:
NAME1;301106
NAME2;300374
NAME3;300966
And so on.
I thought this php file would do the trick, but nothing is added to the database table. There must be some obvious error. Have tried so many things, but with no result. Can anyone see the error?
<?php
$conn = new mysqli("........");
mysqli_query($conn, '
LOAD DATA LOCAL INFILE "C:/Users/Stephan/Desktop/student_magister.csv"
INTO TABLE students
FIELDS TERMINATED BY ";"
LINES TERMINATED BY "
"
');
?>
Thanks!