Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-19807 MySQL error when adding contacts on a report to a group #9594

Merged
merged 1 commit into from
Jan 9, 2017

Conversation

alifrumin
Copy link
Contributor

@alifrumin alifrumin commented Dec 29, 2016

SYBUNT report was throwing a mysql error when trying to add contacts to a group from it because the limit function was replacing the 'SELECT' with 'SELECT SQL COUNT FOUND ROWS' when $this->_select starts with SELECT SQL COUNT FOUND ROWS this was resulting in the select being 'SELECT SQL COUNT FOUND ROWS SQL COUNT FOUND ROWS' this code looks for both the pattern 'SELECT' and 'SELECT SQL COUNT FOUND ROWS' and replaces it with the appropriate select in both the add2group and limit functions


Copy link
Contributor

@jitendrapurohit jitendrapurohit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested this on various reports. It eliminates the DB error and code changes looks good to me.

@colemanw colemanw merged commit 88c31e4 into civicrm:master Jan 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants