Good point, that could potentially save a database operation. Thanks.
I'll update and repost that.
On Fri, 2008-09-12 at 14:06 -0400, Joe Atzberger wrote:
>
> Wouldn't you rather check $value before you go retrieving a
> $default_itemtype you might not use?
>
> + my $default_itemtype;
> + my $itype_sth = $dbh->prepare("SELECT itemtype FROM
> biblioitems WHERE biblionumber = ?");
> + $itype_sth->execute( $biblionumber );
> + ( $default_itemtype ) = $itype_sth->fetchrow_array;
> + $value = $default_itemtype unless ($value);
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches