View | Details | Raw Unified | Return to bug 8223
Collapse All | Expand All

(-)a/C4/Bookseller.pm (-4 / +6 lines)
Lines 63-71 aqbooksellers table in the Koha database. Link Here
63
sub GetBookSeller {
63
sub GetBookSeller {
64
    my $searchstring = shift;
64
    my $searchstring = shift;
65
    $searchstring = q{%} . $searchstring . q{%};
65
    $searchstring = q{%} . $searchstring . q{%};
66
    my $query =
66
    my $query = "
67
'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket '
67
        SELECT aqbooksellers.*, count(*) AS basketcount 
68
      . 'on aqbasket.booksellerid = aqbooksellers.id where name like ? group by aqbooksellers.id order by name';
68
        FROM aqbooksellers 
69
        LEFT JOIN aqbasket ON aqbasket.booksellerid = aqbooksellers.id
70
        WHERE name LIKE ? GROUP BY aqbooksellers.id ORDER BY name
71
    ";
69
72
70
    my $dbh           = C4::Context->dbh;
73
    my $dbh           = C4::Context->dbh;
71
    my $sth           = $dbh->prepare($query);
74
    my $sth           = $dbh->prepare($query);
72
- 

Return to bug 8223