Hi,
I need to insert alot of data into the database. My webpage times out (Error:Problem loading page) if i use the INSERT command. LOAD DATA LOCAL INFILE works fine in mysql but it doesnt seem to be working when I call it from my cgi file.
example.cgi
my $loc = "/var/temp.txt";
my $query="load data local infile '$loc' into table test fields termin
+ated by ',' lines terminated by '\t'";
my $update = $DB->do($query) or die "prepare failed: " . $DB->errstr()
+;
print $update ." Records inserted";
I have already created a table 'test' in the database. I get '0E0 Records inserted' in the web browser when i execute example.cgi.
Any suggestions on what I am doing wrong or what I should be doing would be helpful. Thanks!!
Note: cgi files are saved in a unix system.