[Koha] Report help

Nicole Engard nengard at gmail.com
Thu Apr 5 04:44:18 NZST 2012


Nope :( No results, and we know there are some problem records. I only
made the following changes:

SELECT CONCAT('<a
href=\"/cgi-bin/koha/catalogue/detail.pl?biblionumber=',biblionumber,'\">',biblionumber,'</a>')
AS biblionumber FROM biblioitems,
   (SELECT biblioitemnumber,SUBSTR(marcxml,INSTR(marcxml, "<leader>")+8+6,1) AS
leader6,SUBSTR(marcxml,INSTR(marcxml, "<leader>")+8+7,1) AS leader7 FROM
biblioitems) AS leaders WHERE
biblioitems.biblioitemnumber=leaders.biblioitemnumber AND (leaders.leader6 =
'a' AND (leader7 IN ('a','c','d','n')) OR leader6 = 't') AND itemtype = 'PHOTO'


On Tue, Apr 3, 2012 at 8:43 PM, Chris Cormack <chris at bigballofwax.co.nz> wrote:
> On 4 April 2012 15:19, Nicole Engard <nengard at gmail.com> wrote:
>> From here: http://manual.koha-community.org/3.6/en/XSLTiTypes.html
>>
>>    leader6 = a (and one of the leader7 values below)
>>
>>        leader7 = a
>>
>>        leader7 = c
>>
>>        leader7 = d
>>
>>        leader7 = m
>>
>>    leader6 = t
>>
>
> Something like this then
>
> SELECT * FROM biblioitems,
> (SELECT biblioitemnumber,SUBSTR(marcxml,INSTR(marcxml,
> "<leader>")+8+6,1) AS leader6,SUBSTR(marcxml,INSTR(marcxml,
> "<leader>")+8+7,1) AS leader7 FROM biblioitems) AS leaders
> WHERE biblioitems.biblioitemnumber=leaders.biblioitemnumber AND
> (leaders.leader6 = 'a' AND (leader7 IN ('a','c','d','n')) OR leader6 =
> 't') AND itemtypes = 'your_itemtype goes here'
>
> Chris


More information about the Koha mailing list