Bugzilla – Attachment 10209 Details for
Bug 8223
Properly format SQL query in C4::Bookseller::GetBookSeller
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8223 - Properly format SQL query in C4::Bookseller::GetBookSeller:
0001-Bug-8223-Properly-format-SQL-query-in-C4-Bookseller-.patch (text/plain), 1.28 KB, created by
Martin Renvoize (ashimema)
on 2012-06-11 13:58:16 UTC
(
hide
)
Description:
Bug 8223 - Properly format SQL query in C4::Bookseller::GetBookSeller:
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2012-06-11 13:58:16 UTC
Size:
1.28 KB
patch
obsolete
>From a717ef5a4f4f32faf8fc2be0c663bac45e962b17 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 11 Jun 2012 04:45:57 -0400 >Subject: [PATCH] Bug 8223 - Properly format SQL query in C4::Bookseller::GetBookSeller >Content-Type: text/plain; charset="utf-8" > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > C4/Bookseller.pm | 9 ++++++--- > 1 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm >index 3fded79..a737b71 100644 >--- a/C4/Bookseller.pm >+++ b/C4/Bookseller.pm >@@ -63,9 +63,12 @@ aqbooksellers table in the Koha database. > sub GetBookSeller { > my $searchstring = shift; > $searchstring = q{%} . $searchstring . q{%}; >- my $query = >-'select aqbooksellers.*, count(*) as basketcount from aqbooksellers left join aqbasket ' >- . 'on aqbasket.booksellerid = aqbooksellers.id where name like ? group by aqbooksellers.id order by name'; >+ my $query = " >+ SELECT aqbooksellers.*, count(*) AS basketcount >+ FROM aqbooksellers >+ LEFT JOIN aqbasket ON aqbasket.booksellerid = aqbooksellers.id >+ WHERE name LIKE ? GROUP BY aqbooksellers.id ORDER BY name >+ "; > > my $dbh = C4::Context->dbh; > my $sth = $dbh->prepare($query); >-- >1.7.2.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8223
:
10153
| 10209