Bonjour à tous,
qd je lance cette requete direct en sql via phpmyadmin ça fonctionne impec :
Code :
- LOAD DATA LOCAL INFILE '../form/import.csv' INTO TABLE `listing` FIELDS TERMINATED BY ',' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'
|
qd je l'execute depuis Php via :
Code :
- $query2="LOAD DATA LOCAL INFILE '../form/import.csv' INTO TABLE `listing` FIELDS TERMINATED BY ',' ESCAPED BY '\\' LINES TERMINATED BY '\r\n'";
- $result2 = mysql_query($query2) or die(mysql_error());
|
j'ai cette erreur : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 2
Why ??
ça fait 3h que je cherche, any help much appreciated
Thx!