Topic: subscriptions table rejecting inserts (duplicate entry)

My punbb subscriptions table has begun rejecting inserts, the error it throws is:

Duplicate entry '526-841' for key 1

However, in browsing through the database there's no entry of (user_id)526 (topic_id)841.

Doing a mysql structure dump on the table shows it's set up like this:

CREATE TABLE `pun_subscriptions` (
  `user_id` int(10) unsigned NOT NULL default '0',
  `topic_id` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`user_id`,`topic_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


Anyone have any suggestions for me? I saw something similar on another post:
http://punbb.org/forums/viewtopic.php?id=13126

Where he was instructed to just drop/recreate the table... I'd hate to lose my current subscriptions though.

Thanks in advance,
Ben

Re: subscriptions table rejecting inserts (duplicate entry)

That's odd, a primary key should never consist out of two rows hmm
You could always drop the key and recreate it for just the user ID, and add a unique key for those two rows.

If it still shows errors then, post the code from post.php.

Re: subscriptions table rejecting inserts (duplicate entry)

elbekko wrote:

That's odd, a primary key should never consist out of two rows hmm

That's not true wink
That is in fact the right primary key.

When is it rejecting inserts? There is supposed to be a duplicate key check in the code.
And is that a topic id/user id pair rather than a user id/topic id pair?