coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: Gephri on July 09, 2007, 11:03:15 PM

Title: cpm_formatStats
Post by: Gephri on July 09, 2007, 11:03:15 PM
Would like to add a new parameter to cpm_formatStats.

How can we have it include total votes?
Title: Re: cpm_formatStats
Post by: vuud on July 10, 2007, 02:26:50 AM
Quote from: Gephri on July 09, 2007, 11:03:15 PM
Would like to add a new parameter to cpm_formatStats.

How can we have it include total votes?

As in total votes in the entire system?
Title: Re: cpm_formatStats
Post by: Gephri on July 10, 2007, 06:17:22 AM
hi vuud:

Yes - as in 12,234 votes have been placed for all public images (not the average)
Title: Re: cpm_formatStats
Post by: Gephri on September 02, 2007, 07:24:31 PM
hi vuud - any thoughts on how to accomplish this...?
Title: Re: cpm_formatStats
Post by: vuud on September 03, 2007, 07:40:47 PM
Quote from: Gephri on September 02, 2007, 07:24:31 PM
hi vuud - any thoughts on how to accomplish this...?

It would be pretty simple to craft your own SQL code to sum up the votes I think... Its not something cpmfetch will do - or at least not in an efficent way.

You could probably code it to return the data for every photo in the system, then go through and total up the votes and get your sum.  But that would be so hideously bad that on a system with a good number of photos it would bog out.

Your best bet right now is to code your own sql call...

Title: Re: cpm_formatStats
Post by: Gephri on September 04, 2007, 09:30:20 AM
Thanks for giving this some thought vuud - I was thinking it might be as simple as getting Total Views or Total Comments.

But if your coding idea is the way to get the info - I'm with you on not wanting to bog down the system.