Bugzilla – Attachment 20266 Details for
Bug 9811
Patrons search improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9811: use count(primary_key) instead of count(*)
Bug-9811-use-countprimarykey-instead-of-count.patch (text/plain), 1.18 KB, created by
Jonathan Druart
on 2013-08-12 10:56:56 UTC
(
hide
)
Description:
Bug 9811: use count(primary_key) instead of count(*)
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-08-12 10:56:56 UTC
Size:
1.18 KB
patch
obsolete
>From 20f70482d5e930cf637e7be76caf590695049841 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Mon, 12 Aug 2013 12:55:57 +0200 >Subject: [PATCH] Bug 9811: use count(primary_key) instead of count(*) > >--- > C4/Utils/DataTables/Members.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Utils/DataTables/Members.pm b/C4/Utils/DataTables/Members.pm >index aeb0eba..e23732a 100644 >--- a/C4/Utils/DataTables/Members.pm >+++ b/C4/Utils/DataTables/Members.pm >@@ -104,13 +104,13 @@ sub search { > my $patrons = $sth->fetchall_arrayref({}); > > # Get the iTotalDisplayRecords DataTable variable >- $query = "SELECT COUNT(*) " . $from . ($where ? $where : ""); >+ $query = "SELECT COUNT(borrowers.borrowernumber) " . $from . ($where ? $where : ""); > $sth = $dbh->prepare($query); > $sth->execute(@where_args); > ($iTotalDisplayRecords) = $sth->fetchrow_array; > > # Get the iTotalRecords DataTable variable >- $query = "SELECT COUNT(*) FROM borrowers"; >+ $query = "SELECT COUNT(borrowers.borrowernumber) FROM borrowers"; > $sth = $dbh->prepare($query); > $sth->execute; > ($iTotalRecords) = $sth->fetchrow_array; >-- >1.7.10.4
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 9811
:
16096
|
16111
|
16112
|
16320
|
16362
|
16403
|
16957
|
19056
|
19057
|
19307
|
19633
|
19642
|
20094
|
20095
|
20096
|
20174
|
20266
|
20290
|
20291
|
21169
|
21170
|
21171
|
21172
|
21173
|
21174
|
21175
|
22265
|
23261
|
24095
|
24111
|
26067
|
26068
|
26261
|
26336
|
26337
|
26342
|
26347
|
27642
|
27643
|
27644
|
27645
|
27646
|
27711
|
28738
|
28739
|
28740
|
28741
|
28742
|
28743
|
28744
|
28745
|
28746
|
28747
|
28781
|
28782
|
29019
|
29020
|
29021
|
29022
|
29023
|
29024
|
29025
|
29026
|
29027
|
29028
|
29029
|
29442