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 »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Civi 3.2.3 causes SQL syntax error while trying to delete a member
Pages: [1]

Author Topic: Civi 3.2.3 causes SQL syntax error while trying to delete a member  (Read 988 times)

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Civi 3.2.3 causes SQL syntax error while trying to delete a member
October 16, 2010, 10:42:05 am
We are getting a SQL syntax error while trying to delete a test member/user from our system. We are running CiviCRM 3.2.3 with Drupal 6 and all updates. The error screen is as follows:

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

    [code ] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => DELETE FROM civicrm_activity WHERE source_record_id =  AND activity_type_id IN ( 6 ) [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 activity_type_id IN ( 6 )' at line 1]
    [type] => DB_Error
    [user_info] => DELETE FROM civicrm_activity WHERE source_record_id =  AND activity_type_id IN ( 6 ) [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 activity_type_id IN ( 6 )' at line 1]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="DELETE FROM civicrm_activity WHERE source_record_id =  AND activity_type_id IN ( 6 ) [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 activity_type_id IN ( 6 )' at line 1]"]
)

Why would it have not filled in a source_record_id value?

Other test ID's are able to be deleted.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Civi 3.2.3 causes SQL syntax error while trying to delete a member
October 16, 2010, 11:35:54 am
I just thought to snoop a bit more into this error and issued:

Code: [Select]
SELECT * FROM civicrm_activity WHERE activity_type_id IN ( 6 )
Which gets 0 results. Perhaps is Civi trying to delete something which no longer exists, thus can not look up the `source_record_id` value to qualify which record it wants to delete?
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

mdlueck

  • Ask me questions
  • ****
  • Posts: 382
  • Karma: 4
  • CiviCRM version: 4.7.24
  • CMS version: Drupal 6.x
  • MySQL version: 5.5.54
  • PHP version: 5.3.10
Re: Civi 3.2.3 causes SQL syntax error while trying to delete a member
November 03, 2010, 10:53:15 am
I finally deleted this ID via PHPMyAdmin from the civicrm_contact table. Hopefully no skeletons are lurking about.
--
Michael Lueck
Lueck Data Systems
http://www.lueckdatasystems.com/

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMember (Moderator: Deepak Srivastava) »
  • Civi 3.2.3 causes SQL syntax error while trying to delete a member

This forum was archived on 2017-11-26.