Body: <p>On viewing my contacts group page I am getting an error. </p>
  
  <p>The mysql audit log shows that the failing query is:</p>
  
  <pre><code>CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache397 (SELECT
   25           AS group_id,
   contact_a.id AS id
  FROM civicrm_contact contact_a LEFT JOIN
    civicrm_group_contact `civicrm_group_contact-(23` ON (
   contact_a.id = `civicrm_group_contact-(23`.contact_id
  AND `civicrm_group_contact-(23`.status IN
      (\'Added\'))   LEFT JOIN civicrm_group_contact `civicrm_group_contact-19` ON (contact_a.id = `civicrm_group_contact-19`.contact_id AND `civicrm_group_contact-19`.status IN (\'Added\'))   LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_23,24,25` ON contact_a.id = `civicrm_group_contact_cache_23,24,25`.contact_id    LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_24)` ON contact_a.id = `civicrm_group_contact_cache_24)`.contact_id   WHERE  (  (  ( ( `civicrm_group_contact-19`.group_id = 19  ) OR  ( `civicrm_group_contact_cache_23,24,25`.group_id IN ("23", "24", "25") )  )  AND  ( ( `civicrm_group_contact-(23`.group_id NOT IN ( (23 )  ) OR  ( `civicrm_group_contact_cache_24)`.group_id
  </code></pre>
  
  <p>The quotes look a bit garbled? Any ideas?</p>
  
  <p>I'm not sure anything changed except for the normal upgrades and the volunteers module being installed. </p>
  
  <p>4.7.25 of CiviCRM.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-30T13:02:11.523Z
Comments.Text: What messages do you get in the error log?
Comments.UserDisplayName: Aidan
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-30T17:16:57.600Z
Comments.Text: Sql query exception. I have found out since that it is a particular group. If I view groups by 10 then I can see the first 10 and the last 10.
Comments.UserDisplayName: Interlated
Tags: <error>
Title: Can't view contacts group page DataTables warning due to an sql syntax error
ThreadText: # Can't view contacts group page DataTables warning due to an sql syntax error
  
  (Asked by: username_0 on 2017-10-29)
  
  On viewing my contacts group page I am getting an error. 
  The mysql audit log shows that the failing query is:
  CREATE TEMPORARY TABLE civicrm_temp_group_contact_cache397 (SELECT
   25           AS group_id,
   contact_a.id AS id
  FROM civicrm_contact contact_a LEFT JOIN
    civicrm_group_contact `civicrm_group_contact-(23` ON (
   contact_a.id = `civicrm_group_contact-(23`.contact_id
  AND `civicrm_group_contact-(23`.status IN
      (\'Added\'))   LEFT JOIN civicrm_group_contact `civicrm_group_contact-19` ON (contact_a.id = `civicrm_group_contact-19`.contact_id AND `civicrm_group_contact-19`.status IN (\'Added\'))   LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_23,24,25` ON contact_a.id = `civicrm_group_contact_cache_23,24,25`.contact_id    LEFT JOIN civicrm_group_contact_cache `civicrm_group_contact_cache_24)` ON contact_a.id = `civicrm_group_contact_cache_24)`.contact_id   WHERE  (  (  ( ( `civicrm_group_contact-19`.group_id = 19  ) OR  ( `civicrm_group_contact_cache_23,24,25`.group_id IN ("23", "24", "25") )  )  AND  ( ( `civicrm_group_contact-(23`.group_id NOT IN ( (23 )  ) OR  ( `civicrm_group_contact_cache_24)`.group_id
  
  The quotes look a bit garbled? Any ideas?
  I'm not sure anything changed except for the normal upgrades and the volunteers module being installed. 
  4.7.25 of CiviCRM.
  
  **Tags:** error
  
  > **Comments:**
  > **username_1**: What messages do you get in the error log?  
  > **username_0**: Sql query exception. I have found out since that it is a particular group. If I view groups by 10 then I can see the first 10 and the last 10.  
  
  ---
  
  ## 0 answers
  
  