Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Cannot Reproduce
-
Affects Version/s: 1.2
-
Fix Version/s: 1.3
-
Component/s: Technical infrastructure
-
Labels:None
Description
After running a search and trying to export the data get the following error.
running civicrm-drupal-php4-v1.2-rev3721 drupal 4.5.3
error
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -2
[message] => DB Error: syntax 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.int_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.char_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.int_data as custom_4, custom_value_5.id as custom_value_5_id, custom_value_5.char_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.char_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.char_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.char_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.char_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_11.id as custom_value_11_id, custom_value_11.date_data as custom_11, 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_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.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_11 ON custom_value_11.custom_field_id = 11 AND custom_value_11.entity_table = 'civicrm_contact' AND custom_value_11.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 (3) AND civicrm_group_contact.status IN ("Added") AND LOWER(custom_value_2.char_data) LIKE '%%' AND custom_value_4.int_data = AND LOWER(custom_value_7.char_data) LIKE '%%' [nativecode=1064 ** 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 'AND LOWER(custom_value_7.char_data) LIKE '%%'' at line 14]
[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.int_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.char_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.int_data as custom_4, custom_value_5.id as custom_value_5_id, custom_value_5.char_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.char_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.char_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.char_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.char_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_11.id as custom_value_11_id, custom_value_11.date_data as custom_11, 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_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.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_11 ON custom_value_11.custom_field_id = 11 AND custom_value_11.entity_table = 'civicrm_contact' AND custom_value_11.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 (3) AND civicrm_group_contact.status IN ("Added") AND LOWER(custom_value_2.char_data) LIKE '%%' AND custom_value_4.int_data = AND LOWER(custom_value_7.char_data) LIKE '%%' [nativecode=1064 ** 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 'AND LOWER(custom_value_7.char_data) LIKE '%%'' at line 14]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 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.int_data as custom_1, custom_value_2.id as custom_value_2_id, custom_value_2.char_data as custom_2, custom_value_3.id as custom_value_3_id, custom_value_3.date_data as custom_3, custom_value_4.id as custom_value_4_id, custom_value_4.int_data as custom_4, custom_value_5.id as custom_value_5_id, custom_value_5.char_data as custom_5, custom_value_6.id as custom_value_6_id, custom_value_6.char_data as custom_6, custom_value_7.id as custom_value_7_id, custom_value_7.char_data as custom_7, custom_value_8.id as custom_value_8_id, custom_value_8.char_data as custom_8, custom_value_9.id as custom_value_9_id, custom_value_9.char_data as custom_9, custom_value_10.id as custom_value_10_id, custom_value_10.char_data as custom_10, custom_value_11.id as custom_value_11_id, custom_value_11.date_data as custom_11, 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_4 ON custom_value_4.custom_field_id = 4 AND custom_value_4.entity_table = 'civicrm_contact' AND custom_value_4.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_11 ON custom_value_11.custom_field_id = 11 AND custom_value_11.entity_table = 'civicrm_contact' AND custom_value_11.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 (3) AND civicrm_group_contact.status IN ("Added") AND LOWER(custom_value_2.char_data) LIKE '%%' AND custom_value_4.int_data = AND LOWER(custom_value_7.char_data) LIKE '%%' [nativecode=1064 ** 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 'AND LOWER(custom_value_7.char_data) LIKE '%%'' at line 14]"]
)