MySQL Forums
Forum List  »  Perl

Re: 10MB Insert Issue
Posted by: Bill Karwin
Date: April 26, 2006 12:59PM

Does your text file contain any single-quote or apostrophe characters? It's probably causing a problem with unmatched quotes.

I'd use a parameterized query:

my $sth = $dbh->prepare("INSERT INTO myTable VALUES (1, 123, 'abc', ?)");
my $file_contents = join('', (<FILEHANDLE>));
$sth->execute($file_contents);

Regards,
Bill K.

Options: ReplyQuote


Subject
Written By
Posted
April 26, 2006 12:26PM
Re: 10MB Insert Issue
April 26, 2006 12:59PM
April 26, 2006 01:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.