Lines 12210-12227
$DBversion = "3.23.00.XXX";
Link Here
|
12210 |
if ( CheckVersion($DBversion) ) { |
12210 |
if ( CheckVersion($DBversion) ) { |
12211 |
|
12211 |
|
12212 |
$sth = $dbh->prepare(q{ |
12212 |
$sth = $dbh->prepare(q{ |
12213 |
SELECT s.itemnumber, i.itype, b.itemtype FROM |
12213 |
SELECT s.itemnumber, i.itype, b.itemtype |
12214 |
( SELECT DISTINCT itemnumber |
12214 |
FROM |
12215 |
FROM statistics |
12215 |
( SELECT DISTINCT itemnumber |
12216 |
WHERE ( type = "return" OR type = "localuse" ) AND itemtype IS NULL ) s |
12216 |
FROM statistics |
12217 |
LEFT JOIN |
12217 |
WHERE ( type = "return" OR type = "localuse" ) AND |
12218 |
( SELECT itemnumber,biblionumber, itype |
12218 |
itemtype IS NULL |
12219 |
FROM items ) i |
12219 |
) s |
12220 |
ON (s.itemnumber=i.itemnumber) |
12220 |
LEFT JOIN |
12221 |
LEFT JOIN |
12221 |
( SELECT itemnumber,biblionumber, itype |
12222 |
( SELECT biblionumber, itemtype |
12222 |
FROM items |
12223 |
FROM biblioitems ) b |
12223 |
UNION |
12224 |
ON (i.biblionumber=b.biblionumber) |
12224 |
SELECT itemnumber,biblionumber, itype |
|
|
12225 |
FROM deleteditems |
12226 |
) i |
12227 |
ON (s.itemnumber=i.itemnumber) |
12228 |
LEFT JOIN |
12229 |
( SELECT biblionumber, itemtype |
12230 |
FROM biblioitems |
12231 |
UNION |
12232 |
SELECT biblionumber, itemtype |
12233 |
FROM deletedbiblioitems |
12234 |
) b |
12235 |
ON (i.biblionumber=b.biblionumber); |
12225 |
}); |
12236 |
}); |
12226 |
$sth->execute(); |
12237 |
$sth->execute(); |
12227 |
|
12238 |
|
12228 |
- |
|
|