G'day...
> The clearest way is to use a gool 'ole fashioned conditional:
>
> unless ($sth->execute( 1, $str )) {
>($obj->addError("DB write failed");
>return undef;
> }
Ahh... boc! Thanks! :)
> $sth->execute(1, $str) ||
>do { ($obj->addError("DB write failed"); return undef; }
No n
Michael Kraus wrote:
G'day...
I know when say reading a file handle or performing a database update
that if the function fails you can use one of the or operators to
execute an aleternate statement (either or per say or ||).
What happens if you want to execute more than one statement?
E.g.
$sth->ex
G'day...
I know when say reading a file handle or performing a database update
that if the function fails you can use one of the or operators to
execute an aleternate statement (either or per say or ||).
What happens if you want to execute more than one statement?
E.g.
$sth->exectute(1, $str) |