coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: cmead on December 18, 2009, 10:56:48 PM

Title: Remove votes one-by-one from table "cpg_votes"
Post by: cmead on December 18, 2009, 10:56:48 PM
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.
Title: Re: Remove votes one-by-one from table "cpg_votes"
Post by: Nibbler on December 18, 2009, 11:34:05 PM
The number of votes and the current rating are stored in the pictures table.
Title: Re: Remove votes one-by-one from table "cpg_votes"
Post by: cmead on December 18, 2009, 11:39:10 PM
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.