Page 1 of 1

sum of multiple ID's stopped functioning

Posted: Tue Feb 02, 2016 11:51 am
by mservices
Script URL: https://www.kleinecampingsitalie.eu/fil ... licks.html
Version of script: 2.0.3
Hosting company: alphamegahosting.com
URL of phpinfo.php: https://www.kleinecampingsitalie.eu/ccount/test/
URL of session_test.php: https://www.kleinecampingsitalie.eu/ccount/test/
What terms did you try when SEARCHING for a solution: searched this forum

Write your message below:
Hi,
For some reason, sum of all id's isn't showing any more after i added the last one, Id 54. it used to work fine and as far as i can see nothing changed.
I'm using this in the head:

Code: Select all

<script src="https://www.kleinecampingsitalie.eu/ccount/display.php"></script>
And this code to show the sum:

Code: Select all

<script type="text/javascript" language="javascript">
var sum = 
ccount[1]['c'] + ccount[2]['c'] + ccount[3]['c'] + ccount[4]['c'] + ccount[5]['c'] + ccount[6]['c'] + ccount[7]['c'] + ccount[8]['c'] + ccount[9]['c'] + ccount[10]['c'] + ccount[11]['c'] + ccount[12]['c'] + ccount[13]['c'] + ccount[14]['c'] + ccount[15]['c'] + ccount[16]['c'] + ccount[17]['c'] + ccount[18]['c'] + ccount[19]['c'] + ccount[20]['c'] + ccount[21]['c'] + ccount[22]['c'] + ccount[23]['c'] + ccount[24]['c'] + ccount[25]['c'] + ccount[26]['c'] + ccount[27]['c'] + ccount[28]['c'] + ccount[29]['c'] + ccount[30]['c'] + ccount[31]['c'] + ccount[32]['c'] + ccount[33]['c'] + ccount[36]['c'] + ccount[37]['c'] + ccount[38]['c'] + ccount[39]['c'] + ccount[40]['c'] + ccount[41]['c'] + ccount[43]['c'] + ccount[44]['c'] + ccount[45]['c'] + ccount[46]['c'] + ccount[47]['c'] + ccount[49]['c'] + ccount[50]['c'] + ccount[51]['c'] + ccount[52]['c'] + ccount[53]['c'] + ccount[54]['c']; document.write(sum.formatThousands('US'));
</script>
The code for showing the count for a single id on the same page works fine....

Would very much appreciatie if someone could have a look at it.

Re: sum of multiple ID's stopped functioning

Posted: Tue Feb 02, 2016 12:54 pm
by Klemen
ID 39 doesn't exist. Make sure you only list IDs that actually exist.

Re: sum of multiple ID's stopped functioning

Posted: Tue Feb 02, 2016 3:26 pm
by mservices
:shock: Thanks Klemen..... I feel stupid.... They changed their name, made a new id for the new name, deleted the old from the dashboard but forgot to take them out of the sum....