Advertisement
alexletizia

SYNTAX ERROR in Pledge Report when Balance Due is selected

Oct 18th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.96 KB | None | 0 0
  1. [error] $Fatal Error Details = Array
  2. (
  3. [callback] => Array
  4. (
  5. [0] => CRM_Core_Error
  6. [1] => handle
  7. )
  8.  
  9. [code] => -2
  10. [message] => DB Error: syntax error
  11. [mode] => 16
  12. [debug_info] => SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_exposed_id, pledge_civireport.id as civicrm_pledge_id, pledge_civireport.contact_id as civicrm_pledge_contact_id, pledge_civireport.amount as civicrm_pledge_amount, pledge_civireport.currency as civicrm_pledge_currency, pledge_civireport.status_id as civicrm_pledge_status_id, COALESCE(sum(pledge_payment_civireport.actual_amount), 0) as civicrm_pledge_payment_total_paid, IF(pledge_civireport.status_id IN(3, ), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civireport.actual_amount),0)) as civicrm_pledge_payment_balance_due, (address_civireport.street_number % 2) as civicrm_address_address_odd_street_number
  13. FROM civicrm_pledge pledge_civireport
  14. LEFT JOIN civicrm_contact contact_civireport
  15. ON (contact_civireport.id =
  16. pledge_civireport.contact_id )
  17.  
  18. LEFT JOIN civicrm_pledge_payment pledge_payment_civireport ON
  19. pledge_civireport.id = pledge_payment_civireport.pledge_id
  20. AND pledge_payment_civireport.status_id = 1
  21.  
  22. LEFT JOIN civicrm_address address_civireport
  23. ON (contact_civireport.id =
  24. address_civireport.contact_id) AND
  25. address_civireport.is_primary = 1
  26. WHERE (pledge_civireport.is_test=0 ) GROUP BY pledge_civireport.id, pledge_civireport.currency ORDER BY contact_civireport.sort_name, contact_civireport.id LIMIT 0, 50 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civire' at line 1]
  27. [type] => DB_Error
  28. [user_info] => SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_exposed_id, pledge_civireport.id as civicrm_pledge_id, pledge_civireport.contact_id as civicrm_pledge_contact_id, pledge_civireport.amount as civicrm_pledge_amount, pledge_civireport.currency as civicrm_pledge_currency, pledge_civireport.status_id as civicrm_pledge_status_id, COALESCE(sum(pledge_payment_civireport.actual_amount), 0) as civicrm_pledge_payment_total_paid, IF(pledge_civireport.status_id IN(3, ), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civireport.actual_amount),0)) as civicrm_pledge_payment_balance_due, (address_civireport.street_number % 2) as civicrm_address_address_odd_street_number
  29. FROM civicrm_pledge pledge_civireport
  30. LEFT JOIN civicrm_contact contact_civireport
  31. ON (contact_civireport.id =
  32. pledge_civireport.contact_id )
  33.  
  34. LEFT JOIN civicrm_pledge_payment pledge_payment_civireport ON
  35. pledge_civireport.id = pledge_payment_civireport.pledge_id
  36. AND pledge_payment_civireport.status_id = 1
  37.  
  38. LEFT JOIN civicrm_address address_civireport
  39. ON (contact_civireport.id =
  40. address_civireport.contact_id) AND
  41. address_civireport.is_primary = 1
  42. WHERE (pledge_civireport.is_test=0 ) GROUP BY pledge_civireport.id, pledge_civireport.currency ORDER BY contact_civireport.sort_name, contact_civireport.id LIMIT 0, 50 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civire' at line 1]
  43. [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS contact_civireport.sort_name as civicrm_contact_sort_name, contact_civireport.id as civicrm_contact_exposed_id, pledge_civireport.id as civicrm_pledge_id, pledge_civireport.contact_id as civicrm_pledge_contact_id, pledge_civireport.amount as civicrm_pledge_amount, pledge_civireport.currency as civicrm_pledge_currency, pledge_civireport.status_id as civicrm_pledge_status_id, COALESCE(sum(pledge_payment_civireport.actual_amount), 0) as civicrm_pledge_payment_total_paid, IF(pledge_civireport.status_id IN(3, ), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civireport.actual_amount),0)) as civicrm_pledge_payment_balance_due, (address_civireport.street_number % 2) as civicrm_address_address_odd_street_number
  44. FROM civicrm_pledge pledge_civireport
  45. LEFT JOIN civicrm_contact contact_civireport
  46. ON (contact_civireport.id =
  47. pledge_civireport.contact_id )
  48.  
  49. LEFT JOIN civicrm_pledge_payment pledge_payment_civireport ON
  50. pledge_civireport.id = pledge_payment_civireport.pledge_id
  51. AND pledge_payment_civireport.status_id = 1
  52.  
  53. LEFT JOIN civicrm_address address_civireport
  54. ON (contact_civireport.id =
  55. address_civireport.contact_id) AND
  56. address_civireport.is_primary = 1
  57. WHERE (pledge_civireport.is_test=0 ) GROUP BY pledge_civireport.id, pledge_civireport.currency ORDER BY contact_civireport.sort_name, contact_civireport.id LIMIT 0, 50 [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '), 0, COALESCE(pledge_civireport.amount, 0) - COALESCE(sum(pledge_payment_civire' at line 1]"]
  58. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement