@@ -, +, @@ - SQL query uses 'ccode' as collection code authorised values category, it is CCODE uppercase - The constraint category='CCODE' must be inside join detween items and authorised_values, in this case items.ccode may be NULL - Set syspref AdvancedSearchTypes = ccode - Go to opac-topissues.pl - If no results, select "No limit" in "of the last:" and submit - Select in results a biblio and remove items.ccode from all its items - Refresh opac-topissues.pl (check "All collections" is selected in "Limit to:") --- opac/opac-topissues.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/opac/opac-topissues.pl +++ a/opac/opac-topissues.pl @@ -86,10 +86,12 @@ if($advanced_search_types eq 'ccode'){ FROM biblio LEFT JOIN items USING (biblionumber) LEFT JOIN biblioitems USING (biblionumber) - LEFT JOIN authorised_values ON items.ccode = authorised_values.authorised_value + LEFT JOIN authorised_values ON ( + authorised_values.category = 'CCODE' + AND items.ccode = authorised_values.authorised_value + ) WHERE 1 $whereclause - AND authorised_values.category = 'ccode' GROUP BY biblio.biblionumber HAVING tot >0 ORDER BY tot DESC --