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) »
  • CiviPledge DB Error: syntax error creating new pledge or accessing dashboard
Pages: [1]

Author Topic: CiviPledge DB Error: syntax error creating new pledge or accessing dashboard  (Read 451 times)

loneprairie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 0
  • CiviCRM version: 4.5.8
  • CMS version: WordPress 4.1.1
  • MySQL version: 5.5.40-cll
  • PHP version: 5.4.38
CiviPledge DB Error: syntax error creating new pledge or accessing dashboard
May 27, 2014, 10:10:53 am
Hi All,

This one is bit beyond my depth but I'm willing to do editing if required. When our development staff attempt to create a new pledge or just view the CiviPledge dashboard they receive a DB Error: syntax error. The log looks like this:

Code: [Select]
May 27 11:41:07  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] =>
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currency
FROM   civicrm_pledge
WHERE  status_id !=  AND is_test=0
GROUP BY  currency
 [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 is_test=0
GROUP BY  currency' at line 3]
    [type] => DB_Error
    [user_info] =>
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currency
FROM   civicrm_pledge
WHERE  status_id !=  AND is_test=0
GROUP BY  currency
 [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 is_test=0
GROUP BY  currency' at line 3]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="
SELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currency
FROM   civicrm_pledge
WHERE  status_id !=  AND is_test=0
GROUP BY  currency
 [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 is_test=0
GROUP BY  currency' at line 3]"]
)


May 27 11:41:07  [info] $backTrace = #0 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(197): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB.php(969): PEAR_Error->PEAR_Error("DB Error: syntax error", -2, 16, (Array:2), "\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#4 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-2, 16, (Array:2), "\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#5 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -2, NULL, NULL, "\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...", "DB_Error", TRUE)
#6 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(898): DB_common->raiseError(-2, NULL, NULL, NULL, "1064 ** You have an error in your SQL syntax; check the manual that correspon...")
#7 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(327): DB_mysql->mysqlRaiseError()
#8 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#9 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2421): DB_common->query("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#10 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1613): DB_DataObject->_query("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#11 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(160): DB_DataObject->query("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...")
#12 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(908): CRM_Core_DAO->query("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...", TRUE)
#13 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Pledge/BAO/Pledge.php(354): CRM_Core_DAO::executeQuery("\nSELECT sum( amount ) as pledge_amount, count( id ) as pledge_count, currenc...", (Array:0))
#14 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Pledge/Page/DashBoard.php(92): CRM_Pledge_BAO_Pledge::getTotalAmountAndCount("Completed", NULL, NULL)
#15 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Pledge/Page/DashBoard.php(106): CRM_Pledge_Page_DashBoard->preProcess()
#16 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(323): CRM_Pledge_Page_DashBoard->run((Array:2), NULL)
#17 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(72): CRM_Core_Invoke::runItem((Array:14))
#18 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:2))
#19 /home/neappleb/public_html/wp-content/plugins/civicrm/civicrm.php(470): CRM_Core_Invoke::invoke((Array:2))
#20 [internal function](): CiviCRM_For_WordPress->invoke("")
#21 /home/neappleb/public_html/wp-includes/plugin.php(470): call_user_func_array((Array:2), (Array:1))
#22 /home/neappleb/public_html/wp-admin/admin.php(211): do_action("toplevel_page_CiviCRM")
#23 {main}

I would appreciate any help you can offer.

Thanks,
e.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • CiviPledge DB Error: syntax error creating new pledge or accessing dashboard

This forum was archived on 2017-11-26.