[Koha-bugs] [Bug 20664] Optimize retrieval of biblio and item data
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Mon Apr 1 01:54:42 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20664
--- Comment #85 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 86002
--> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=86002
Bug 20664: Optimize retrieval of biblio and item data
Review of attachment 86002:
--> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=20664&attachment=86002)
-----------------------------------------------------------------
::: C4/Items.pm
@@ +1357,5 @@
> + my $item_level_itype = C4::Context->preference('item-level_itypes');
> + # This is so much faster than using Koha::Items->search that it makes sense even if it's ugly.
> + my $query = 'SELECT * FROM items WHERE biblionumber = ?';
> + if (@$itemnumbers) {
> + $query .= ' AND itemnumber IN (' . join(',', @$itemnumbers) . ')';
This should be adding ? placeholders and binding the itemnumbers before
executing.
While it would probably be rare, a malformed record could cause SQL errors
here.
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list