Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.4.4
-
Fix Version/s: 3.4.5
-
Component/s: CiviCRM Search
-
Labels:None
Description
In the Search Builder when you make a query for Contributions including the field "Contribution Status", it fails
I've checked in the sandbox as well, same error:
Database Error Code: 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 ') = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0' at line 1, 1064
Additional Details:
Array
(
[callback] => Array
(
[0] => CRM_Core_Error
[1] => handle
)
[code] => -2
[message] => DB Error: syntax error
[mode] => 16
[debug_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( LOWER() = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0) [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 ') = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0' at line 1]
[type] => DB_Error
[user_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( LOWER() = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0) [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 ') = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0' at line 1]
[to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( LOWER() = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0) [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 ') = '2' AND civicrm_contribution.is_test = 0 ) ) AND (contact_a.is_deleted = 0' at line 1]"]
)