PDA

View Full Version : Reset Poll Votes?


dj83
04-22-2014, 07:39 PM
Hello,

I am using vb 4.2.1 and i'm just wondering if there are any mods out there that would allow me to delete all votes from a poll so members can vote again?

tbworld
04-22-2014, 08:51 PM
I am using vb 4.2.1 and i'm just wondering if there are any mods out there that would allow me to delete all votes from a poll so members can vote again?

No MOD that I can find, but this is not difficult via the database. See table 'pollvote'. You can easily write a simple query to delete the poll votes for a poll once you know the ID. The ID can easily be found in table 'poll'.

This may not undo, and/or cause problems in statistical calculations so you will have to test carefully. Please make a backup of your database before making changes to your database or installing a new MOD.

Note(s)
1.) If you delete a 'poll' via the database you must also set the field 'pollid = 0' in the associated thread in 'thread' table. If you don't you will have a skeletal 'poll' left in the thread.
2.) The users last vote may still reside in the activity stream, depends on the pruning date. This is only a possible visual ambiquity, since even if you delete the poll on the thread the activity link will just point to the thread without an error. (Oops - Just remembered I added polls to the activity stream -- this is not a default feature on v4.2.1)