in reply to Perl DBI and mySQL
That will expand into something likeqq{INSERT INTO mfa.genome ($cc) VALUES ("$vv")};
Note that "val1,val2,val3" is ONE string value, unless the values contain special characters that break the SQL.INSERT INTO mfa.genome (col1,col2,col3) VALUES ("val1,val2,val3")
As hinted above, use something like
my $values = join(",",map { $dbh->quote($_) } @values); my $sql = qq{INSERT INTO mfa.genome ($cc) VALUES ($values)}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl DBI and mySQL
by jperlq (Acolyte) on Feb 04, 2008 at 20:49 UTC |