In light of the recent die discussions mentioned I did not want to inflame things and divert the focus to die. Indeed the focus has shifted and I failed! On the other hand, code like that is far more convenient which is an added point granted in favour of die.
BTW, you didn't check any return values of 'prepare' or whether iterating 'fetchrow_hashref' ended naturally or with an error (like the connection resetting).Good point. Though the above code was just for asking the question which focused elsewhere:
find lib -type f -exec grep -H -w 'prepare(' \{\} \; if( ! defined $sth ){ warn $sqlstr."\n".__FILE__."::db_get_enums_for_t +able() (line ".__LINE__.") : error, call to ".'prepare()'." has faile +d for above SQL: ".$dbh->errstr; return undef } ...
In reply to Re^5: SQL: Update column(s) value with extra WHERE
by bliako
in thread SQL: Update column(s) value with extra WHERE
by bliako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |