Hi all
I've created a view to list all nid's that conform to the 2 filters, filter by content type and filter CCK field value. All the proper nid's display however when I enable grouping, I get the following error:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 5 query: SELECT COUNT(node.nid) AS nid FROM node node INNER JOIN content_type_conference_registration node_data_field_conf_reg_reg_status ON node.vid = node_data_field_conf_reg_reg_status.vid WHERE (node_data_field_conf_reg_reg_status.field_conf_reg_reg_status_value = 'Confirmed - Normal') AND (node.type in ('conference_registration')) GROUP BY in /usr/www/users/beautyr/test.beautyforashes.co.za/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1149.
Please could you offer some advice?
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1089152-follow-up-fix-d7.patch | 697 bytes | dawehner |
| #7 | 1089152-follow-up-fix-d6.patch | 739 bytes | dawehner |
| #2 | 1089152-groupby-without_groupby.patch | 704 bytes | dawehner |
Comments
Comment #1
GlitchFreak commentedI don't think it's grouping by properly since there is no criteria after 'GROUP BY'
Comment #2
dawehnerThis patch solves the issue for me
Comment #3
GlitchFreak commentedPatch works for me, thanks D. Changing status to reviewed, however more testers are welcome.
Comment #4
merlinofchaos commentedCommitted to 6.x-3.x -- does not apply to 7.x-3.x
Comment #5
dawehnerAnd ported.
Comment #7
dawehnerThis sadly caused another issue.
Here is a patch to fix the problem in both d6 and d7.
Comment #8
stella commentedi'm not sure about that one... surely if
$this->groupbyis empty then there should be no group by clause at all? i.e. the$non_aggregatesarray should only be used if we are indeed adding a group by clauseAt least that's my understanding... currently with that patch i get a group by clause on queries that i don't expect a group by on