24 Nov
2009
24 Nov
'09
5:17 p.m.
LluĂs wrote:
ok, I have now read "Creative querying".
Otherwise, I have a problem using "views" and "group by" modules, the query is basically a
"SELECT a, SUM(b) FROM table JOIN... WHERE ... GROUP BY a"
It works perfectly before db_rewrite_sql (show more rows, but the SUM is ok); but after de db_rewrite_sql it show the correct rows but SUM(b) is doubled.
Yes, probably because the user is a member of 2 different roles that have access, and therefore the GROUP BY ends up counting both. There's a problem similar to this in core in counting forum posts, for example. I don't know of any solutions to this, either. This is a really unfortunate effect of the query we use. :/