View Single Post
Old
  (#7 (permalink))
gsicard
Junior Member
 
Status: Offline
Posts: 1
Join Date: Aug 2004
12-05-2008, 08:09 PM

Backup your database before trying this.

I have a similar issue on a site with over 15,000 members and many post in the forum.

So here is how it was fixed:

First run these queries on the nuke_bbposts table using phpmyadmin.

Step 1.
This gets rid of the '-1' poster_id and changes it to '1' which is the default Anonymous user.

Code:
UPDATE `databasename`.`nuke_bbposts` SET `poster_id` = '1' WHERE `nuke_bbposts`.`poster_id` = '-1';
Step 2.
This query shows you all your poster ids where nuke user id is blank.

Code:
SELECT nuke_bbposts.poster_id, nuke_users.username
FROM nuke_bbposts
LEFT JOIN nuke_users
ON nuke_bbposts.poster_id = nuke_users.user_id
WHERE (nuke_users.username IS NULL)
Write down all the poster_id values. You may nave to page through the table to get them all.

Step 3.
Then on the nuke_bbposts table run an sql command like this for each poster_id you wrote down in step 2.

Code:
UPDATE `databasename`.`nuke_bbposts` SET `poster_id` = '1' WHERE `nuke_bbposts`.`poster_id` = '??';
replace ?? with the poster_ids you wrote down and run the sql for each id.
someone could probably code this in a .php file for one click operation but I don't know how.

These steps worked for my very large site and took about 30 minutes to complete.
Molosser Dogs
   
Reply With Quote