I have tried the below code for laoding the inline file in drupal db
$sql = "LOAD DATA INFILE '".db_escape_string($this->file_name).
"' INTO TABLE `".$this->table_name.
"` FIELDS TERMINATED BY '".db_escape_string($this->field_separate_char).
"' OPTIONALLY ENCLOSED BY '".db_escape_string($this->field_enclose_char).
"' ESCAPED BY '".db_escape_string($this->field_escape_char).
"' ".
($this->use_csv_header ? " IGNORE 1 LINES " : "")
."(`".implode("`,`", $this->arr_csv_columns)."`)";
$res = db_query($sql);
$this->error = mysql_error();
I got the error as but the file was present in the folder
user warning: File 'http:\localhost\example\sites\default\files\example_1.csv' not found (Errcode: 22) query: LOAD DATA INFILE 'http://localhost/example/sites/default/files/example_1.csv' INTO TABLE temp_21_10_2010_06_38_00
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"' ESCAPED BY '\' IGNORE 1 LINES (PROGRAMNAME
,OFFLINE
,ONLINE
,INSTOCK
) in C:\wamp\www\example\sites\all\modules\importmodule\Quick_CSV_import.php on line 65.
On line 65 the above php code $res = db_query($sql);
is present.