Jump to content

'core_reputation_index' not mandatory?


GriefCode

Recommended Posts

Hey,

I've got just a report on one of my recent plugins which resulted into an error, with the following info:
 

SELECT tid FROM `ipb_forums_topics` AS `forums_topics` WHERE MONTH(FROM_UNIXTIME(start_date)) = MONTH(NOW()) AND tid IN (SELECT item_id FROM core_reputation_index WHERE app='forums' GROUP BY item_id ORDER BY COUNT(item_id) DESC) AND ( forum_id IN(X) ) LIMIT 5
IPS\Db\Exception: Table 'core_reputation_index' doesn't exist (1146)
#0 /system/Db/Select.php(356): IPS\_Db->preparedQuery('SELECT tid FROM...', Array, true)
#1 /system/Db/Select.php(418): IPS\Db\_Select->runQuery()

I've no idea, as I have 2 test forums and my dev forum where this table is available, is there any condition that this table does not exists?

Regards

Link to comment
Share on other sites

1 minute ago, Ryan Ashbrook said:

The table name appears to be missing the database prefix. Notice how forums_topics has ipb_ on it, and core_reputation_index does not.

You will need to adjust your code to add the prefix to the table name (\IPS\Db::i()->prefix).

Indeed, you are right. Thanks!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...