esta es la consulta
Código MySQL:
Ver original
en el php si hago esto marca error
Código PHP:
$insertar = " LOAD DATA INFILE '/var/www/html/miweb/carpeta/output_2011-07-21.txt' INTO TABLE tabla
FIELDS TERMINATED BY ',' ENCLOSED BY ''
LINES TERMINATED BY '\n' ignore 1 lines
";
mysql_query($insertar) or die (mysql_error());
Código PHP:
$insertar = " LOAD DATA INFILE '/var/www/html/miweb/carpeta/output_2011-07-21.txt'". "INTO TABLE tabla".
"FIELDS TERMINATED BY ','". "ENCLOSED BY \'\"'".
"LINES TERMINATED BY '\n' IGNORE 1 LINES
";
mysql_query($insertar) or die (mysql_error());
gracias