Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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.
I have already created a table 'test' in the database. I get '0E0 Records inserted' in the web browser when i execute example.cgi.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";
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: LOAD DATA LOCAL INFILE not working
by tobyink (Canon) on Nov 15, 2012 at 07:09 UTC | |
by Anonymous Monk on Nov 15, 2012 at 14:05 UTC | |
by Anonymous Monk on Nov 15, 2012 at 18:01 UTC | |
Re: LOAD DATA LOCAL INFILE not working
by erix (Prior) on Nov 15, 2012 at 17:47 UTC | |
Re: LOAD DATA LOCAL INFILE not working
by Anonymous Monk on Nov 15, 2012 at 17:31 UTC | |
by Anonymous Monk on Nov 15, 2012 at 18:09 UTC |
Back to
Seekers of Perl Wisdom