my $sql = qq! UPDATE table SET ! . ( defined($phone) ? qq! phone = '$phone', ! : '')
Remember, you should really be using placeholders to prevent SQL injection attacks.
In reply to Re: Flexible Update SQL
by Anonymous Monk
in thread Flexible Update SQL
by bichonfrise74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |