<?xml version="1.0" encoding="windows-1252"?>
<node id="1003930" title="LOAD DATA LOCAL INFILE not working" created="2012-11-15 00:07:21" updated="2012-11-15 00:07:21">
<type id="115">
perlquestion</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
&lt;p&gt;Hi,&lt;br&gt;&lt;br&gt;

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.
&lt;br&gt;
&lt;code&gt;
example.cgi
my $loc = "/var/temp.txt";
my $query="load data local infile '$loc' into table test fields terminated by ',' lines terminated by '\t'";
my $update = $DB-&gt;do($query) or die "prepare failed: " . $DB-&gt;errstr();
print $update ." Records inserted";
&lt;/code&gt;
I have already created a table 'test' in the database. I get '0E0 Records inserted' in the web browser when i execute example.cgi.&lt;br&gt;
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.
&lt;/p&gt;</field>
<field name="reputation">
2</field>
</data>
</node>
