Remove votes one-by-one from table "cpg_votes" Remove votes one-by-one from table "cpg_votes"
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Remove votes one-by-one from table "cpg_votes"

Started by cmead, December 18, 2009, 10:56:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

cmead

I accidentally left ANONYMOUS voting on.  This allowed submitters to vote for themselves more than once, easily.  I checked the IP votes through the "cpg_votes_stats" table and was able to discover the unique IP addresses that had voted were lower than the total presented on the site (http://www.chrismead.com/holidaygallery/index.php).

Total votes for the example image = 2093.  Unique IP votes = 107.  So, I am going to make their vote total = 107.

Again, I want to REDUCE the amount of votes for an individual picture. I can't take it to ZERO and start over.

So, I thought I could just DELETE individual records tied to the picture number 34 in the "cpg_votes" table until I go to the correct number (in my case, the correct number is the number of unique IP addresses that had voted for the picture).

I was able to delete a number of records to test if this would work and it did NOT.  I cannot understand why.  I've tried running update.php and all other manner of refreshes...nothing seems to work.

Help!  I'm not a coder but play one on TV.

Nibbler

The number of votes and the current rating are stored in the pictures table.

cmead

I did find that, actually...and of course right after I posted!  Thanks so much.  How is the total built then if not from those other tables I referenced. Or is the total updated incrementally by the logged individual records?  IN other words, the total only increases as new votes come in.