Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.2
    • Fix Version/s: None
    • Labels:
      None

      Description

      When trying to export Primary Contact fields from search results I get the following error (This may be related to CRM-556). This SQL statement is crazy at 8000 characters, my longest ever was around 3500. Just glancing at it I think it could be made a lot simpler simply by using table aliases. And Perhaps some sort of subquery might work for bringing in the custom fields.

      For my system details check out:
      http://beta.albertagreens.ca/phpinfo.php

      Sorry. A non-recoverable error has occurred.

      Database Error Code: Too many tables. MySQL can only use 31 tables in a join, 1116

      Return to CiviCRM menu.

      error

      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => -1
      [message] => DB Error: unknown error
      [mode] => 16
      [debug_info] => SELECT DISTINCT civicrm_contact.id as contact_id, civicrm_individual.id as individual_id, civicrm_individual.first_name as first_name, civicrm_individual.middle_name as middle_name, civicrm_individual.last_name as last_name, civicrm_individual.job_title as job_title, civicrm_individual.birth_date as birth_date, civicrm_gender.id as gender_id, civicrm_gender.name as gender, civicrm_individual_prefix.id as individual_prefix_id, civicrm_individual_prefix.name as individual_prefix, civicrm_individual_suffix.id as individual_suffix_id, civicrm_individual_suffix.name as individual_suffix, civicrm_household.id as household_id, civicrm_household.household_name as household_name, civicrm_organization.id as organization_id, civicrm_organization.organization_name as organization_name, civicrm_organization.legal_name as legal_name, civicrm_organization.sic_code as sic_code, civicrm_location.id as location_id, civicrm_address.id as address_id, civicrm_address.street_address as street_address, civicrm_address.supplemental_address_1 as supplemental_address_1, civicrm_address.supplemental_address_2 as supplemental_address_2, civicrm_address.city as city, civicrm_address.postal_code as postal_code, civicrm_state_province.id as state_province_id, civicrm_state_province.name as state_province, civicrm_country.id as country_id, civicrm_country.name as country, civicrm_phone.id as phone_id, civicrm_phone.phone as phone, civicrm_email.id as email_id, civicrm_email.email as email, civicrm_im.id as im_id, civicrm_im.name as im, civicrm_contact.legal_identifier as legal_identifier, civicrm_contact.external_identifier as external_identifier, civicrm_contact.nick_name as nick_name, civicrm_contact.home_URL as home_URL, civicrm_note.id as note_id, civicrm_note.note as note, custom_value_1.id as custom_value_1_id, custom_value_1.date_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.date_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_5.id as custom_value_5_id, custom_value_5.int_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.int_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.int_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.int_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.int_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_13.id as custom_value_13_id, custom_value_13.int_data as custom_13, custom_value_14.id as custom_value_14_id, custom_value_14.int_data as custom_14, custom_value_15.id as custom_value_15_id, custom_value_15.char_data as custom_15, custom_value_16.id as custom_value_16_id, custom_value_16.int_data as custom_16, custom_value_17.id as custom_value_17_id, custom_value_17.int_data as custom_17, custom_value_18.id as custom_value_18_id, custom_value_18.char_data as custom_18, custom_value_19.id as custom_value_19_id, custom_value_19.int_data as custom_19, civicrm_group_contact.id as group_contact_id, civicrm_group_contact.status as status FROM civicrm_contact LEFT JOIN civicrm_individual ON (civicrm_contact.id = civicrm_individual.contact_id) LEFT JOIN civicrm_gender ON civicrm_individual.gender_id = civicrm_gender.id LEFT JOIN civicrm_individual_prefix ON civicrm_individual.prefix_id = civicrm_individual_prefix.id LEFT JOIN civicrm_individual_suffix ON civicrm_individual.suffix_id = civicrm_individual_suffix.id LEFT JOIN civicrm_household ON (civicrm_contact.id = civicrm_household.contact_id) LEFT JOIN civicrm_organization ON (civicrm_contact.id = civicrm_organization.contact_id) LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND civicrm_phone.is_primary = 1) LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1) LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND civicrm_im.is_primary = 1) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_note.entity_id )
      LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_2 ON custom_value_2.custom_field_id = 2 AND custom_value_2.entity_table = 'civicrm_contact' AND custom_value_2.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_5 ON custom_value_5.custom_field_id = 5 AND custom_value_5.entity_table = 'civicrm_contact' AND custom_value_5.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_6 ON custom_value_6.custom_field_id = 6 AND custom_value_6.entity_table = 'civicrm_contact' AND custom_value_6.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_7 ON custom_value_7.custom_field_id = 7 AND custom_value_7.entity_table = 'civicrm_contact' AND custom_value_7.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_8 ON custom_value_8.custom_field_id = 8 AND custom_value_8.entity_table = 'civicrm_contact' AND custom_value_8.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_9 ON custom_value_9.custom_field_id = 9 AND custom_value_9.entity_table = 'civicrm_contact' AND custom_value_9.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_10 ON custom_value_10.custom_field_id = 10 AND custom_value_10.entity_table = 'civicrm_contact' AND custom_value_10.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_13 ON custom_value_13.custom_field_id = 13 AND custom_value_13.entity_table = 'civicrm_contact' AND custom_value_13.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_14 ON custom_value_14.custom_field_id = 14 AND custom_value_14.entity_table = 'civicrm_contact' AND custom_value_14.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_15 ON custom_value_15.custom_field_id = 15 AND custom_value_15.entity_table = 'civicrm_contact' AND custom_value_15.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_16 ON custom_value_16.custom_field_id = 16 AND custom_value_16.entity_table = 'civicrm_contact' AND custom_value_16.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_17 ON custom_value_17.custom_field_id = 17 AND custom_value_17.entity_table = 'civicrm_contact' AND custom_value_17.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_18 ON custom_value_18.custom_field_id = 18 AND custom_value_18.entity_table = 'civicrm_contact' AND custom_value_18.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_19 ON custom_value_19.custom_field_id = 19 AND custom_value_19.entity_table = 'civicrm_contact' AND custom_value_19.entity_id = civicrm_contact.id LEFT JOIN civicrm_group_contact ON civicrm_contact.id = civicrm_group_contact.contact_id WHERE civicrm_contact.domain_id = 1 AND civicrm_group_contact.group_id IN (1) AND civicrm_group_contact.status IN ("Added") [nativecode=1116 ** Too many tables. MySQL can only use 31 tables in a join]
      [type] => db_error
      [user_info] => SELECT DISTINCT civicrm_contact.id as contact_id, civicrm_individual.id as individual_id, civicrm_individual.first_name as first_name, civicrm_individual.middle_name as middle_name, civicrm_individual.last_name as last_name, civicrm_individual.job_title as job_title, civicrm_individual.birth_date as birth_date, civicrm_gender.id as gender_id, civicrm_gender.name as gender, civicrm_individual_prefix.id as individual_prefix_id, civicrm_individual_prefix.name as individual_prefix, civicrm_individual_suffix.id as individual_suffix_id, civicrm_individual_suffix.name as individual_suffix, civicrm_household.id as household_id, civicrm_household.household_name as household_name, civicrm_organization.id as organization_id, civicrm_organization.organization_name as organization_name, civicrm_organization.legal_name as legal_name, civicrm_organization.sic_code as sic_code, civicrm_location.id as location_id, civicrm_address.id as address_id, civicrm_address.street_address as street_address, civicrm_address.supplemental_address_1 as supplemental_address_1, civicrm_address.supplemental_address_2 as supplemental_address_2, civicrm_address.city as city, civicrm_address.postal_code as postal_code, civicrm_state_province.id as state_province_id, civicrm_state_province.name as state_province, civicrm_country.id as country_id, civicrm_country.name as country, civicrm_phone.id as phone_id, civicrm_phone.phone as phone, civicrm_email.id as email_id, civicrm_email.email as email, civicrm_im.id as im_id, civicrm_im.name as im, civicrm_contact.legal_identifier as legal_identifier, civicrm_contact.external_identifier as external_identifier, civicrm_contact.nick_name as nick_name, civicrm_contact.home_URL as home_URL, civicrm_note.id as note_id, civicrm_note.note as note, custom_value_1.id as custom_value_1_id, custom_value_1.date_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.date_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_5.id as custom_value_5_id, custom_value_5.int_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.int_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.int_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.int_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.int_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_13.id as custom_value_13_id, custom_value_13.int_data as custom_13, custom_value_14.id as custom_value_14_id, custom_value_14.int_data as custom_14, custom_value_15.id as custom_value_15_id, custom_value_15.char_data as custom_15, custom_value_16.id as custom_value_16_id, custom_value_16.int_data as custom_16, custom_value_17.id as custom_value_17_id, custom_value_17.int_data as custom_17, custom_value_18.id as custom_value_18_id, custom_value_18.char_data as custom_18, custom_value_19.id as custom_value_19_id, custom_value_19.int_data as custom_19, civicrm_group_contact.id as group_contact_id, civicrm_group_contact.status as status FROM civicrm_contact LEFT JOIN civicrm_individual ON (civicrm_contact.id = civicrm_individual.contact_id) LEFT JOIN civicrm_gender ON civicrm_individual.gender_id = civicrm_gender.id LEFT JOIN civicrm_individual_prefix ON civicrm_individual.prefix_id = civicrm_individual_prefix.id LEFT JOIN civicrm_individual_suffix ON civicrm_individual.suffix_id = civicrm_individual_suffix.id LEFT JOIN civicrm_household ON (civicrm_contact.id = civicrm_household.contact_id) LEFT JOIN civicrm_organization ON (civicrm_contact.id = civicrm_organization.contact_id) LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND civicrm_phone.is_primary = 1) LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1) LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND civicrm_im.is_primary = 1) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_note.entity_id )
      LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_2 ON custom_value_2.custom_field_id = 2 AND custom_value_2.entity_table = 'civicrm_contact' AND custom_value_2.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_5 ON custom_value_5.custom_field_id = 5 AND custom_value_5.entity_table = 'civicrm_contact' AND custom_value_5.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_6 ON custom_value_6.custom_field_id = 6 AND custom_value_6.entity_table = 'civicrm_contact' AND custom_value_6.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_7 ON custom_value_7.custom_field_id = 7 AND custom_value_7.entity_table = 'civicrm_contact' AND custom_value_7.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_8 ON custom_value_8.custom_field_id = 8 AND custom_value_8.entity_table = 'civicrm_contact' AND custom_value_8.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_9 ON custom_value_9.custom_field_id = 9 AND custom_value_9.entity_table = 'civicrm_contact' AND custom_value_9.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_10 ON custom_value_10.custom_field_id = 10 AND custom_value_10.entity_table = 'civicrm_contact' AND custom_value_10.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_13 ON custom_value_13.custom_field_id = 13 AND custom_value_13.entity_table = 'civicrm_contact' AND custom_value_13.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_14 ON custom_value_14.custom_field_id = 14 AND custom_value_14.entity_table = 'civicrm_contact' AND custom_value_14.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_15 ON custom_value_15.custom_field_id = 15 AND custom_value_15.entity_table = 'civicrm_contact' AND custom_value_15.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_16 ON custom_value_16.custom_field_id = 16 AND custom_value_16.entity_table = 'civicrm_contact' AND custom_value_16.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_17 ON custom_value_17.custom_field_id = 17 AND custom_value_17.entity_table = 'civicrm_contact' AND custom_value_17.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_18 ON custom_value_18.custom_field_id = 18 AND custom_value_18.entity_table = 'civicrm_contact' AND custom_value_18.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_19 ON custom_value_19.custom_field_id = 19 AND custom_value_19.entity_table = 'civicrm_contact' AND custom_value_19.entity_id = civicrm_contact.id LEFT JOIN civicrm_group_contact ON civicrm_contact.id = civicrm_group_contact.contact_id WHERE civicrm_contact.domain_id = 1 AND civicrm_group_contact.group_id IN (1) AND civicrm_group_contact.status IN ("Added") [nativecode=1116 ** Too many tables. MySQL can only use 31 tables in a join]
      [to_string] => [db_error: message="DB Error: unknown error" code=-1 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT civicrm_contact.id as contact_id, civicrm_individual.id as individual_id, civicrm_individual.first_name as first_name, civicrm_individual.middle_name as middle_name, civicrm_individual.last_name as last_name, civicrm_individual.job_title as job_title, civicrm_individual.birth_date as birth_date, civicrm_gender.id as gender_id, civicrm_gender.name as gender, civicrm_individual_prefix.id as individual_prefix_id, civicrm_individual_prefix.name as individual_prefix, civicrm_individual_suffix.id as individual_suffix_id, civicrm_individual_suffix.name as individual_suffix, civicrm_household.id as household_id, civicrm_household.household_name as household_name, civicrm_organization.id as organization_id, civicrm_organization.organization_name as organization_name, civicrm_organization.legal_name as legal_name, civicrm_organization.sic_code as sic_code, civicrm_location.id as location_id, civicrm_address.id as address_id, civicrm_address.street_address as street_address, civicrm_address.supplemental_address_1 as supplemental_address_1, civicrm_address.supplemental_address_2 as supplemental_address_2, civicrm_address.city as city, civicrm_address.postal_code as postal_code, civicrm_state_province.id as state_province_id, civicrm_state_province.name as state_province, civicrm_country.id as country_id, civicrm_country.name as country, civicrm_phone.id as phone_id, civicrm_phone.phone as phone, civicrm_email.id as email_id, civicrm_email.email as email, civicrm_im.id as im_id, civicrm_im.name as im, civicrm_contact.legal_identifier as legal_identifier, civicrm_contact.external_identifier as external_identifier, civicrm_contact.nick_name as nick_name, civicrm_contact.home_URL as home_URL, civicrm_note.id as note_id, civicrm_note.note as note, custom_value_1.id as custom_value_1_id, custom_value_1.date_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.date_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_5.id as custom_value_5_id, custom_value_5.int_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.int_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.int_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.int_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.int_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_13.id as custom_value_13_id, custom_value_13.int_data as custom_13, custom_value_14.id as custom_value_14_id, custom_value_14.int_data as custom_14, custom_value_15.id as custom_value_15_id, custom_value_15.char_data as custom_15, custom_value_16.id as custom_value_16_id, custom_value_16.int_data as custom_16, custom_value_17.id as custom_value_17_id, custom_value_17.int_data as custom_17, custom_value_18.id as custom_value_18_id, custom_value_18.char_data as custom_18, custom_value_19.id as custom_value_19_id, custom_value_19.int_data as custom_19, civicrm_group_contact.id as group_contact_id, civicrm_group_contact.status as status FROM civicrm_contact LEFT JOIN civicrm_individual ON (civicrm_contact.id = civicrm_individual.contact_id) LEFT JOIN civicrm_gender ON civicrm_individual.gender_id = civicrm_gender.id LEFT JOIN civicrm_individual_prefix ON civicrm_individual.prefix_id = civicrm_individual_prefix.id LEFT JOIN civicrm_individual_suffix ON civicrm_individual.suffix_id = civicrm_individual_suffix.id LEFT JOIN civicrm_household ON (civicrm_contact.id = civicrm_household.contact_id) LEFT JOIN civicrm_organization ON (civicrm_contact.id = civicrm_organization.contact_id) LEFT JOIN civicrm_location ON (civicrm_location.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_location.entity_id AND civicrm_location.is_primary = 1) LEFT JOIN civicrm_address ON civicrm_location.id = civicrm_address.location_id LEFT JOIN civicrm_state_province ON civicrm_address.state_province_id = civicrm_state_province.id LEFT JOIN civicrm_country ON civicrm_address.country_id = civicrm_country.id LEFT JOIN civicrm_phone ON (civicrm_location.id = civicrm_phone.location_id AND civicrm_phone.is_primary = 1) LEFT JOIN civicrm_email ON (civicrm_location.id = civicrm_email.location_id AND civicrm_email.is_primary = 1) LEFT JOIN civicrm_im ON (civicrm_location.id = civicrm_im.location_id AND civicrm_im.is_primary = 1) LEFT JOIN civicrm_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      civicrm_contact.id = civicrm_note.entity_id )
      LEFT JOIN civicrm_custom_value custom_value_1 ON custom_value_1.custom_field_id = 1 AND custom_value_1.entity_table = 'civicrm_contact' AND custom_value_1.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_2 ON custom_value_2.custom_field_id = 2 AND custom_value_2.entity_table = 'civicrm_contact' AND custom_value_2.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_3 ON custom_value_3.custom_field_id = 3 AND custom_value_3.entity_table = 'civicrm_contact' AND custom_value_3.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_5 ON custom_value_5.custom_field_id = 5 AND custom_value_5.entity_table = 'civicrm_contact' AND custom_value_5.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_6 ON custom_value_6.custom_field_id = 6 AND custom_value_6.entity_table = 'civicrm_contact' AND custom_value_6.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_7 ON custom_value_7.custom_field_id = 7 AND custom_value_7.entity_table = 'civicrm_contact' AND custom_value_7.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_8 ON custom_value_8.custom_field_id = 8 AND custom_value_8.entity_table = 'civicrm_contact' AND custom_value_8.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_9 ON custom_value_9.custom_field_id = 9 AND custom_value_9.entity_table = 'civicrm_contact' AND custom_value_9.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_10 ON custom_value_10.custom_field_id = 10 AND custom_value_10.entity_table = 'civicrm_contact' AND custom_value_10.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_13 ON custom_value_13.custom_field_id = 13 AND custom_value_13.entity_table = 'civicrm_contact' AND custom_value_13.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_14 ON custom_value_14.custom_field_id = 14 AND custom_value_14.entity_table = 'civicrm_contact' AND custom_value_14.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_15 ON custom_value_15.custom_field_id = 15 AND custom_value_15.entity_table = 'civicrm_contact' AND custom_value_15.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_16 ON custom_value_16.custom_field_id = 16 AND custom_value_16.entity_table = 'civicrm_contact' AND custom_value_16.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_17 ON custom_value_17.custom_field_id = 17 AND custom_value_17.entity_table = 'civicrm_contact' AND custom_value_17.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_18 ON custom_value_18.custom_field_id = 18 AND custom_value_18.entity_table = 'civicrm_contact' AND custom_value_18.entity_id = civicrm_contact.id
      LEFT JOIN civicrm_custom_value custom_value_19 ON custom_value_19.custom_field_id = 19 AND custom_value_19.entity_table = 'civicrm_contact' AND custom_value_19.entity_id = civicrm_contact.id LEFT JOIN civicrm_group_contact ON civicrm_contact.id = civicrm_group_contact.contact_id WHERE civicrm_contact.domain_id = 1 AND civicrm_group_contact.group_id IN (1) AND civicrm_group_contact.status IN ("Added") [nativecode=1116 ** Too many tables. MySQL can only use 31 tables in a join]"]
      )

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              dalin dave hansen-lange
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: