MySQL Forums
Forum List  »  Perl

Re: Variable number of parameters in perl function
Posted by: Alexandr Ciornii
Date: January 18, 2008 05:43PM

Replace code with this:

my $str=join(',',map {$dbh->quote($_)} @args1;
$q=$dbh->prepare("INSERT INTO $table VALUES($str)")
or die "Couldn't prepare statement: " . $dbh->errstr;

$q->execute()
or die "Couldn't execute statement: " . $q->errstr;

Options: ReplyQuote


Subject
Written By
Posted
Re: Variable number of parameters in perl function
January 18, 2008 05:43PM


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.