[Koha-patches] [PATCH] Use biblioitems.itemtype as a default for items.itype

Joe Atzberger joe.atzberger at liblime.com
Fri Sep 12 20:06:27 CEST 2008


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);
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-patches/attachments/20080912/2c1dba70/attachment-0001.htm>


More information about the Koha-patches mailing list