CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Syntax error upgrading from 2.2.8 to 3.1.4 (updating civicrm_report_instance)
Pages: [1]

Author Topic: Syntax error upgrading from 2.2.8 to 3.1.4 (updating civicrm_report_instance)  (Read 692 times)

arrow

  • Guest
Syntax error upgrading from 2.2.8 to 3.1.4 (updating civicrm_report_instance)
April 21, 2010, 06:37:24 pm
a non-recoverable error occurs when I try to upgrade our db to 3.1.4 (after green screen.)  This looks like a syntax error in the upgrade code, not expecting an ampersand in the value?  but it's really hard for me to tell.  Awful complex in there.

Error Details:

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

       
Code: [Select]
=> -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => UPDATE civicrm_report_instance SET form_values = 'a:26:{s:6:"fields";a:3:{s:19:"contribution_source";s:1:"1";s:13:"total_amount1";s:1:"1";s:13:"total_amount2";s:1:"1";}s:22:"receive_date1_relative";s:1:"0";s:18:"receive_date1_from";s:10:"03/09/2009";s:16:"receive_date1_to";s:10:"03/15/2009";s:22:"receive_date2_relative";s:1:"0";s:18:"receive_date2_from";s:10:"03/09/2010";s:16:"receive_date2_to";s:10:"03/15/2010";s:17:"total_amount1_min";s:0:"";s:17:"total_amount1_max";s:0:"";s:16:"total_amount1_op";s:3:"lte";s:19:"total_amount1_value";s:0:"";s:17:"total_amount2_min";s:0:"";s:17:"total_amount2_max";s:0:"";s:16:"total_amount2_op";s:3:"lte";s:19:"total_amount2_value";s:0:"";s:25:"contribution_status_id_op";s:2:"in";s:28:"contribution_status_id_value";a:1:{i:0;s:1:"1";}s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:9:"group_bys";a:1:{s:19:"contribution_source";s:1:"1";}s:11:"description";s:52:"compares donation during '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:1:"0";s:6:"groups";s:0:"";}' WHERE id = 22 [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 '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:' at line 1]
    [type] => DB_Error
    [user_info] => UPDATE civicrm_report_instance SET form_values = 'a:26:{s:6:"fields";a:3:{s:19:"contribution_source";s:1:"1";s:13:"total_amount1";s:1:"1";s:13:"total_amount2";s:1:"1";}s:22:"receive_date1_relative";s:1:"0";s:18:"receive_date1_from";s:10:"03/09/2009";s:16:"receive_date1_to";s:10:"03/15/2009";s:22:"receive_date2_relative";s:1:"0";s:18:"receive_date2_from";s:10:"03/09/2010";s:16:"receive_date2_to";s:10:"03/15/2010";s:17:"total_amount1_min";s:0:"";s:17:"total_amount1_max";s:0:"";s:16:"total_amount1_op";s:3:"lte";s:19:"total_amount1_value";s:0:"";s:17:"total_amount2_min";s:0:"";s:17:"total_amount2_max";s:0:"";s:16:"total_amount2_op";s:3:"lte";s:19:"total_amount2_value";s:0:"";s:25:"contribution_status_id_op";s:2:"in";s:28:"contribution_status_id_value";a:1:{i:0;s:1:"1";}s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:9:"group_bys";a:1:{s:19:"contribution_source";s:1:"1";}s:11:"description";s:52:"compares donation during '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:1:"0";s:6:"groups";s:0:"";}' WHERE id = 22 [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 '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:' at line 1]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="UPDATE civicrm_report_instance SET form_values = 'a:26:{s:6:"fields";a:3:{s:19:"contribution_source";s:1:"1";s:13:"total_amount1";s:1:"1";s:13:"total_amount2";s:1:"1";}s:22:"receive_date1_relative";s:1:"0";s:18:"receive_date1_from";s:10:"03/09/2009";s:16:"receive_date1_to";s:10:"03/15/2009";s:22:"receive_date2_relative";s:1:"0";s:18:"receive_date2_from";s:10:"03/09/2010";s:16:"receive_date2_to";s:10:"03/15/2010";s:17:"total_amount1_min";s:0:"";s:17:"total_amount1_max";s:0:"";s:16:"total_amount1_op";s:3:"lte";s:19:"total_amount1_value";s:0:"";s:17:"total_amount2_min";s:0:"";s:17:"total_amount2_max";s:0:"";s:16:"total_amount2_op";s:3:"lte";s:19:"total_amount2_value";s:0:"";s:25:"contribution_status_id_op";s:2:"in";s:28:"contribution_status_id_value";a:1:{i:0;s:1:"1";}s:6:"gid_op";s:2:"in";s:9:"gid_value";a:0:{}s:9:"group_bys";a:1:{s:19:"contribution_source";s:1:"1";}s:11:"description";s:52:"compares donation during '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:8:"email_cc";s:0:"";s:10:"permission";s:1:"0";s:6:"groups";s:0:"";}' WHERE id = 22 [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 '09 & '10 membership drives";s:13:"email_subject";s:0:"";s:8:"email_to";s:0:"";s:' at line 1]"]

)

arrow

  • Guest
Re: Syntax error upgrading from 2.2.8 to 3.1.4 (updating civicrm_report_instance)
April 21, 2010, 07:01:22 pm
Interesting.  the issue wasn't the ampersand, it was the 's in the "compares donation during '09 & '10 membership" that made the syntax break.  removing the extra 's fixed it, although I suppose I could've escaped them.  :D

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Syntax error upgrading from 2.2.8 to 3.1.4 (updating civicrm_report_instance)

This forum was archived on 2017-11-26.