Hi Michael, On Thu, Oct 8, 2009 at 5:59 PM, Michael Hafen <[email protected]> wrote: > + # > + # Check if borrower has checked this title out before > + # > + if ( C4::Context->preference("CircRestrictPreviouslyIssued") ) { > + my $sth = $dbh->prepare("SELECT old_issues.itemnumber FROM > old_issues CROSS JOIN items USING (itemnumber) WHERE biblionumber = ?"); > + $sth->execute($item->{'biblionumber'}); > + my $alreadyissued = $sth->fetchrow_hashref(); > + $sth->finish(); > + if ( $alreadyissued->{'itemnumber'} ) { > + $needsconfirmation{PATRON_PREVIOUSLY_ISSUED} = 1; > + } > + }
The query would seem to trigger the warning if *any* patron had checked out the item, and I don't see why it should be a cross join instead of an inner join. Shouldn't it also filter by the borrower? Regards, Galen -- Galen Charlton [email protected] _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha.org/mailman/listinfo/koha-patches
