Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.

How to edit or delete entries in "forum_poll_voters" table??

Hi all!

I hope this is the right categorie for my question, if not plese move it.

I have a user who made a wrong vote on the forum and asked me to cancel his vote (delete), so he can vote again.

Now i have seen that "forum_poll_voters" table can't be edited in phpmyadmin as:
"This table does not contain any unique ("unique") column. Grid-editing function, check boxes, edit, copy and delete links are not available."

I know that his vote itself is saved (added) in the table "forum_poll_options".
But i can't delete or edit this table too!

So who can help me to edit or (better) delete this users vote so he can vote again?
What is the best way to delete the whole vote (vote itself including his loged IP) from the databse so the user can vote again?

Thanks for the help /tutorial to do so! :G
Hello,
Replace the XX with the user and forum id to the wanted ones you need to remove.
Run this code in a custom page preview, you only need to paste in and hit preview once for the code to run.

CodeDownload  
<?php
$result = dbquery("DELETE FROM ".$db_prefix."forum_poll_voters WHERE forum_id='XX' AND forum_vote_user_id = 'XX'");
?>

Quote

Domi wrote:

Hello,
Replace the XX with the user and forum id to the wanted ones you need to remove.
Run this code in a custom page preview, you only need to paste in and hit preview once for the code to run.

CodeDownload  
<?php
$result = dbquery("DELETE FROM ".$db_prefix."forum_poll_voters WHERE forum_id='XX' AND forum_vote_user_id = 'XX'");
?>



Shouldn't it be WHERE thread_id='XX' ? ;-)

Whatever, got it working, done. Thanks for help! :G
Close enough, glad you got it working :)
Thread Information
Author
Replies
4 posts
Views
2674 times
Last Post
Last updated on 6 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, tom-fusion