When I try to display a content type that has simple karma activated I get this error:

    * user warning: Table 'drupal.simple_karma_cache' doesn't exist query: SELECT karma_d FROM simple_karma_cache WHERE oid = 1967 AND otype = 'n' in D:\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.simple_karma_cache' doesn't exist query: SELECT karma_d FROM simple_karma_cache WHERE oid = 1967 AND otype = 'n' in D:\drupal\includes\database.mysql.inc on line 172. 

I tried executing this code from simeple_karma.install:

CREATE TABLE {simple_karma_cache} (
          oid            int(10) NOT NULL default '0',
          otype          ENUM('c', 'n', 'u') NOT NULL,
          karma         int(7)  NOT NULL default '0',
          karma_d       int(7)  NOT NULL default '0',
          created       int(10) NOT NULL default '0',
          user_rank     int(7) NOT NULL default '0',

          PRIMARY KEY (oid,otype), 
          KEY (oid),
          KEY (otype),
          KEY (karma),
          KEY (karma_d),
          KEY (created),
          KEY (user_rank)
          )

and I got this error :

 CREATE TABLE {simple_karma_cache}(
oid int( 10 ) NOT NULL default '0',
otype ENUM( 'c', 'n', 'u' ) NOT NULL ,
karma int( 7 ) NOT NULL default '0',
karma_d int( 7 ) NOT NULL default '0',
created int( 10 ) NOT NULL default '0',
user_rank int( 7 ) NOT NULL default '0',
PRIMARY KEY ( oid, otype ) ,
KEY ( oid ) ,
KEY ( otype ) ,
KEY ( karma ) ,
KEY ( karma_d ) ,
KEY ( created ) ,
KEY ( user_rank )
)

MySQL said: Documentation
#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 '{simple_karma_cache} (
          oid            int(10) NOT NULL default '0',
' at line 1 

Comments

mercmobily’s picture

Hi,

The code straight from the module won't work because of the curly brackets. Change that {simple_karma_cache} into simple_karma_cache and it will work.

Questions:

1) Which version of MySql are you using?
2) Are you installing or upgrading?
3) Are you using the latest simple_larma? The branch 5.x-1.x-dev is not actually maintained

I am just about to release another _major_ version of the module. I suggest you wait a couple of days. The module has been going through extremely heavy development, and will be deployed on a large scale site in about 3 hours.

Bye,

Merc.

mercmobily’s picture

Status: Active » Closed (fixed)

Hi,

Assuming that the user was using 5.x-1.x-dev, which is not a maintained branch.

Closing.

Merc.

mercmobily’s picture

Hi,

Just to make sure, I've just installed SImple Karma 1.11, and it works!
If that doesn't work, please reopen the bug and provided the info I requested above.

Merc.