projects
/
dbsrgits/DBIx-Class.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
9b44fdf
)
cookbook tweak for count distinct
Justin Hunter [Thu, 11 Jun 2009 20:29:53 +0000 (20:29 +0000)]
lib/DBIx/Class/Manual/Cookbook.pod
patch
|
blob
|
blame
|
history
diff --git
a/lib/DBIx/Class/Manual/Cookbook.pod
b/lib/DBIx/Class/Manual/Cookbook.pod
index
574a8e1
..
b13b05a
100644
(file)
--- a/
lib/DBIx/Class/Manual/Cookbook.pod
+++ b/
lib/DBIx/Class/Manual/Cookbook.pod
@@
-279,7
+279,7
@@
any of your aliases using either of these:
my $count = $rs->count;
# Equivalent SQL:
- # SELECT COUNT( DISTINCT( me.name ) ) FROM artist me
+ # SELECT COUNT( * ) FROM (SELECT me.name FROM artist me GROUP BY me.name) count_subq:
=head2 Grouping results