I found this problem with a fresh install of the module:

user warning: Table 'mydb.aapi_stats' doesn't exist query: SELECT f.*, r.*, s.count FROM files f INNER JOIN file_revisions r ON f.fid = r.fid LEFT JOIN aapi_stats s ON f.fid = s.fid WHERE r.vid = 1 ORDER BY f.fid DESC in /var/www/vhosts/birchermues.li/httpdocs/includes/database.mysql.inc on line 172.

Workaround:
In your database add the table manually:

CREATE TABLE 'aapi_stats' (
fid int(10) unsigned NOT NULL default '0',
count int(10) unsigned NOT NULL default '0',
PRIMARY KEY (fid)
)

Problem comes from here:

function aapi_update_20() {
  $queries = array();
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      
      $queries[] = update_sql("CREATE TABLE {aapi_stats} (
fid int(10) unsigned NOT NULL default '0',
count int(10) unsigned NOT NULL default '0',
PRIMARY KEY (fid)
)");
      
      break;
    
    case 'pgsql':
      
      break;
  }
  return $queries;
}

the hook_update_N() doesn't work. I guess the update number isn't correct according to http://drupal.org/node/136078

Comments

zeropaper’s picture

Status: Needs work » Needs review
zeropaper’s picture

Status: Needs review » Closed (won't fix)