I try the code below:
$db = new mysqli('localhost', 'root', '', 'teste');
if(mysqli_connect_errno()){
echo mysqli_connect_error();
}
mysqli_query($db, "LOAD DATA INFILE 'dados.txt' INTO TABLE teste FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n' (nome, idade, sexo)" );
echo "OK";
it returns ok but none row is insert in the table.
my file test is:
"Name Example 1",15,"F"
"Name Example 2",23,"M"
"Name Example 3",15,"M"