Bug 11163: display correct itemtype usage count when deleting an itemtype

Wrong usage of UNION instead of UNION ALL prevented the count to match
the expected value.

Steps to reproduce:
- Create an itemtype.
- Create some biblios setting the created itemtype at biblio level.
- Create some items setting the created itemtype on them.
- Try to delete the itemtype in Home > Administration > Item types, the
count is 1 and doesn't match the expected result.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
This commit is contained in:
Tomas Cohen Arazi 2013-10-29 18:39:22 -03:00 committed by Galen Charlton
parent a1d4af3d73
commit 39a656c6ba
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ elsif ( $op eq 'delete_confirm' ) {
my $sth = $dbh->prepare('
SELECT COUNT(*) AS total FROM (
SELECT itemtype AS t FROM biblioitems
UNION
UNION ALL
SELECT itype AS t FROM items
) AS tmp
WHERE tmp.t=?