Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 3.4.8
    • Fix Version/s: 4.1.0
    • Component/s: CiviMember
    • Labels:
      None

      Description

      Issue arose immediately after an upgrade from 3.4.4 to 3.4.8.

      Getting DB Error: syntax error only when trying to add a new membership to a contact.

      Rest of application appears stable.

      Running: PHP version 5.3.8
      Running: MySQL version 5.1.56

      Text of 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 ') AND ( civicrm_membership.contact_id = 1 ) ORDER BY start_date DESC' at line 4, 1064
      Additional Details:

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

      [code] => -2
      [message] => DB Error: syntax error
      [mode] => 16
      [debug_info] => SELECT *
      FROM civicrm_membership

      WHERE ( is_test IS NULL OR is_test = 0 ) AND ( status_id != ) AND ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC
      [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 ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC' at line 4]
      [type] => DB_Error
      [user_info] => SELECT *
      FROM civicrm_membership

      WHERE ( is_test IS NULL OR is_test = 0 ) AND ( status_id != ) AND ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC
      [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 ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC' at line 4]
      [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT *
      FROM civicrm_membership

      WHERE ( is_test IS NULL OR is_test = 0 ) AND ( status_id != ) AND ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC
      [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 ( civicrm_membership.contact_id = 1 )

      ORDER BY start_date DESC' at line 4]"]
      )

      +++++++++++++++

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              pgraber Peter Graber
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: