Updating lots of database fields in a single row

Denny 2013 at denny.me
Thu Jan 24 13:57:24 GMT 2013

You do know what $status contains in the example (so you could hardcore it in the SQL anyway).  $id is up for grabs though.

Simon Wilcox <essuu at ourshack.com> wrote:

>On 24/01/2013 03:01, Sam Kington wrote:
>> I mean, sure, this is safe:
>> if ($status eq 'foo') {
>>      $dbh->do("UPDATE table SET status='$status' WHERE id=$id");
>> }
>Only if you're certain you know what $status and $id contain.

Sent from my mobile phone. Please excuse terseness, typos and top-posting.

More information about the london.pm mailing list