I am using MySQL LOAD DATA LOCAL INFILE
command and I get this error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1148 The used
command is not allowed with this MySQL version: LOAD DATA LOCAL INFILE
'/tmp/phpI0ox54' INTO TABLE `dev_tmp` FIELDS TERMINATED BY ',' ENCLOSED
BY '"' LINES TERMINATED BY '
' IGNORE 1 LINES; Array ( ) in
dc_real_estate_form_submit() (line 147 of /PATH/TO/PHP/SCRIPT).
What setting can we change to allow LOAD DATA LOCAL infile?
Here is the Drupal 7 code we are using:
$sql = "LOAD DATA LOCAL INFILE '".$file."'
INTO TABLE `dev_tmp`
FIELDS
TERMINATED BY ','
ENCLOSED BY '"'
LINES
TERMINATED BY '\r\n'
IGNORE 1 LINES";
db_query($sql);
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…