PDA

View Full Version : Removing thread ratings?


darnoldy
02-07-2015, 06:51 PM
Folks-

Okay, so I ask weird questions...

I don't want to remove the feature, I want to remove all the thread ratings that have been given.

I have been testing some stuff, and given ratings to threads during the test. I want to go back to zero before I go live.

--don

ozzy47
02-07-2015, 07:05 PM
Take a backup first! This is untested.

Run this first:
SELECT user.username, user.userid, thread.title, threadrate.vote FROM threadrate LEFT JOIN user ON user.userid = threadrate.userid LEFT JOIN thread ON thread.threadid = threadrate.threadid ORDER BY thread.title

Then if you see what you expected, run this:
DELETE FROM threadrate WHERE userid = X

Change X to the userid of the offender.

You'll need to update your thread & forum information counters afterwards.

darnoldy
02-07-2015, 07:21 PM
Thanks, Ozzy! I'll give it a try a little later (I have some more screwing around to do first).

--don

ozzy47
02-07-2015, 07:27 PM
Not a problem, hopefully it works. :)