Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.1, 3.1.1, 3.2
    • Fix Version/s: 3.2
    • Component/s: CiviCRM Search
    • Labels:
      None

      Description

      Doing a "Search Builder" search on 'Individual' where 'Note(s)' 'IS NULL' gives the error below. Confirmed in the 3.1 demo and 3.2 sandbox.

      -----------------------------------------------------------------------------------------

      Sorry. A non-recoverable error has occurred.
      DB Error: syntax 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 ''' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individ' at line 2, 1064

      Error 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_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      contact_a.id = civicrm_note.entity_id ) WHERE ( ( ( civicrm_note.note IS NULL '' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individual') ) ) AND ( 1 ) [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 ''' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individ' at line 2]
      [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_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      contact_a.id = civicrm_note.entity_id ) WHERE ( ( ( civicrm_note.note IS NULL '' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individual') ) ) AND ( 1 ) [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 ''' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individ' at line 2]
      [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_note ON ( civicrm_note.entity_table = 'civicrm_contact' AND
      contact_a.id = civicrm_note.entity_id ) WHERE ( ( ( civicrm_note.note IS NULL '' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individual') ) ) AND ( 1 ) [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 ''' OR civicrm_note.subject IS NULL '' ) AND contact_a.contact_type IN ('Individ' at line 2]"]

        Attachments

          Activity

            People

            • Assignee:
              ashwini Ashwini Poharkar
              Reporter:
              bwaindwain BwainDwain
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: