in reply to Re: SQL INSERT creator
in thread SQL INSERT creator
my $sql; { my @values = ('?') x @columns; # I love that, BTW... local $" = ','; $sql = "INSERT INTO $table (@columns) VALUES (@values)"; } $dbh->prepare($sql) or die("Couldn't prepare $sql " . $dbh->errstr);
Sure, the likelyhood of any of the DBI/DBD stuff using a string-interpolated array is pretty low but it is still bad practice.
--
$you = new YOU;
honk() if $you->love(perl)
|
---|