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 CiviEvent (Moderator: Yashodha Chaku) »
  • Error when trying to add activity or event types
Pages: [1]

Author Topic: Error when trying to add activity or event types  (Read 1350 times)

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Error when trying to add activity or event types
March 30, 2008, 05:57:33 am
When trying to add an activity or event type, I get the following error message:

(I'll also mention here that "preview" on this forum doesn't work - not on Safari, anyway... so I hope this post looks OK!)

Event Type Options

Sorry. A non-recoverable error has occurred.
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 'DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14' at line 1, 1064
Return to home page.
Error Details:
Code: [Select]
Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -2
    [message] => DB Error: syntax error
    [mode] => 16
    [debug_info] => SELECT MAX(CONVERT(value, DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14 [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 'DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14' at line 1]
    [type] => DB_Error
    [user_info] => SELECT MAX(CONVERT(value, DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14 [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 'DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14' at line 1]
    [to_string] => [db_error: message="DB Error: syntax error" code=-2 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT MAX(CONVERT(value, DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14 [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 'DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14' at line 1]"]
)

Trying to get this site into production - I have to say it's looking pretty scary at this point. Whoever takes a look at this, thanks very much in advance for your help![/code]

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Error when trying to add activity or event types
March 30, 2008, 08:20:30 am
What version of MySQL are you running. I just pasted the query below into phpMyAdmin on my install and it ran w/o errors:

SELECT MAX(CONVERT(value, DECIMAL)) AS max_weight FROM civicrm_option_value WHERE option_group_id = 14

phpMyAdmin shows my MySQL version as 5.0.41-log. CiviCRM 2.0 requires MySQL 5.0.x + as documented in the Installation instructions.
Protect your investment in CiviCRM by  becoming a Member!

bcobin

  • I post frequently
  • ***
  • Posts: 337
  • Karma: 9
    • InterCreative Media
  • CiviCRM version: 4.3.3
  • CMS version: Drupal 7.22
  • MySQL version: 5.5.9
  • PHP version: 5.3
Re: Error when trying to add activity or event types
March 30, 2008, 11:40:45 am
Guilty... as charged. Hosting company is running 4.1.20. They're doing the upgrade right now - I'll let you know and thanks a million!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviEvent (Moderator: Yashodha Chaku) »
  • Error when trying to add activity or event types

This forum was archived on 2017-11-26.