[Koha-patches] [PATCH] Use biblioitems.itemtype as a default for items.itype
Michael Hafen
mdhafen at tech.washk12.org
Fri Sep 12 21:13:44 CEST 2008
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);
More information about the Koha-patches
mailing list