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 CiviContribute (Moderator: Donald Lobo) »
  • Error in SQL syntax for PayPal Standard and Express Payment Processes
Pages: [1]

Author Topic: Error in SQL syntax for PayPal Standard and Express Payment Processes  (Read 2431 times)

mgregoire

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Error in SQL syntax for PayPal Standard and Express Payment Processes
April 14, 2010, 05:41:51 am
Hi there,

For a Contribution Page, I've settled a:

- PayPal Pro process, the payment is done, but after finishing payment the same massage than above is displayed.
- PayPal Standard process, when I try to pay, at the beginning, the following message is displayed :

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 ) AND ( civicrm_membership.membersh' at line 4, 1064

Code: [Select]

Error 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 ( status_id !=  )  AND (  civicrm_membership.contact_id = 1 ) AND (  civicrm_membership.membership_type_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 ) AND (  civicrm_membership.membersh' at line 4]
    [type] => DB_Error
    [user_info] => SELECT *
 FROM civicrm_membership
 
 WHERE ( status_id !=  )  AND (  civicrm_membership.contact_id = 1 ) AND (  civicrm_membership.membership_type_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 ) AND (  civicrm_membership.membersh' 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 ( status_id !=  )  AND (  civicrm_membership.contact_id = 1 ) AND (  civicrm_membership.membership_type_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 ) AND (  civicrm_membership.membersh' at line 4]"]
)


Is someone an idea?

Thanks by advance! :o

[/code]
« Last Edit: April 14, 2010, 08:11:53 am by mgregoire »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Error in SQL syntax for PayPal Standard and Pro Payment Processes
April 14, 2010, 07:05:05 am

check this forum post:

http://forum.civicrm.org/index.php?topic=12212.0

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

mgregoire

  • I post occasionally
  • **
  • Posts: 44
  • Karma: 0
Re: Error in SQL syntax for PayPal Standard and Pro Payment Processes
April 14, 2010, 08:11:20 am
Hi,
Many thanks for the help regarding the first message.

After Pending activation, I have now the following message:

Code: [Select]

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

    [code] => -22
    [message] => DB Error: value count on row
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 4 ,  20100414171730 , 'Debit' ,  10.00 ,  0.59 ,  9,41 , 'EUR' , 'PayPal_Express' , '7XP229102S069123V' )  [nativecode=1136 ** Column count doesn't match value count at row 1]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 4 ,  20100414171730 , 'Debit' ,  10.00 ,  0.59 ,  9,41 , 'EUR' , 'PayPal_Express' , '7XP229102S069123V' )  [nativecode=1136 ** Column count doesn't match value count at row 1]
    [to_string] => [db_error: message="DB Error: value count on row" code=-22 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 4 ,  20100414171730 , 'Debit' ,  10.00 ,  0.59 ,  9,41 , 'EUR' , 'PayPal_Express' , '7XP229102S069123V' )  [nativecode=1136 ** Column count doesn't match value count at row 1]"]
)

Many thanks for the help !

[/code]

marlutin

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
Re: Error in SQL syntax for PayPal Standard and Express Payment Processes
April 26, 2010, 01:03:00 pm
Looking at your query I see that the currency is set to sepearate Euros and cents with a comma. It's probably the reason why the column count does'nt match.

I have the same problem with "french" language installed for Civicrm.
The 3.1.4 version using the l10n data for the same version is propagating several problem, also in the members status, but I don't know where to report this, and how to find the place to patch the data...

marlutin

  • I’m new here
  • *
  • Posts: 22
  • Karma: 1
Re: Error in SQL syntax for PayPal Standard and Express Payment Processes
June 21, 2010, 12:54:02 am
After upgrading to Cicicrm 3.1.5, Drupal 6.17. I'm still facing the same problem with paypal express payments. After all the payment process, I'm getting the fatal error described below.
It seems that the column count does'nt match because for some obsure reasin, the currency unit.decimal divider is set to comma.
see ..........'Debit' ,  5 ,  0.72 ,  4,28 , 'CHF' , 'PayPal_Express'
Does anyone knows someting about that, it seem to be some localization issue ore somewhat...

Code: [Select]
Error Details:

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

    [code] => -22
    [message] => DB Error: value count on row
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 9 ,  20100621090438 , 'Debit' ,  5 ,  0.72 ,  4,28 , 'CHF' , 'PayPal_Express' , '0WP23486YK638253H' )  [nativecode=1136 ** Column count doesn't match value count at row 1]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 9 ,  20100621090438 , 'Debit' ,  5 ,  0.72 ,  4,28 , 'CHF' , 'PayPal_Express' , '0WP23486YK638253H' )  [nativecode=1136 ** Column count doesn't match value count at row 1]
    [to_string] => [db_error: message="DB Error: value count on row" code=-22 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_financial_trxn (contribution_id , trxn_date , trxn_type , total_amount , fee_amount , net_amount , currency , payment_processor , trxn_id ) VALUES ( 9 ,  20100621090438 , 'Debit' ,  5 ,  0.72 ,  4,28 , 'CHF' , 'PayPal_Express' , '0WP23486YK638253H' )  [nativecode=1136 ** Column count doesn't match value count at row 1]"]
)
[/code]

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • Error in SQL syntax for PayPal Standard and Express Payment Processes

This forum was archived on 2017-11-26.