in reply to Re^2: Flexible Update SQL
in thread Flexible Update SQL
Actually, placeholders *do* handle the null parameter. Constructing the update statement can do the rest...
my @fields = qw(name phone city country); my $SQL = "update table set " . join(", ", map { "$_=?" } @fields) . "where ...."; my $ST=$DB->prepare($SQL); while (...) { my @values = (.....); $ST->execute(@values); }
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In Section
Seekers of Perl Wisdom