
September 18th, 2004, 02:28 AM
|
|
Contributing User
|
|
Join Date: Sep 2004
Location: Vancouver, British Columbia
Posts: 53
Time spent in forums: < 1 sec
Reputation Power: 4
|
|
|
problem with statement handle
Hello
I am trying to use DBI along with Perl and MySQL and i had some problem using the statement handle (sth) .
Basically what i did was I generated a text file on Windows and tried to load it using the sth as below:
$sth = $dbh->prepare("LOAD DATA LOCAL INFILE 'file_directory' INTO TABLE
'table_name'");
#Send statement to database
$sth->execute||die "Couldn't execute statement";
while(($col1,$col2,$col3,$col4) = $sth2->fetchrow_array()){
print "$col1,$col2,$col3,$col4 \n";
}
and I get a error message regarding SQL syntax. Can someone help me?
|