Is there a way to add the toatal number of <%

# Thread: Is there a way to add the toatal number of <%

1. Join Date
Dec 1969
Posts
56

## Is there a way to add the toatal number of <%

2. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## Why not do it server-side?

&#060;%<BR>pointsTotal = 0<BR>%&#062;<BR><BR>Then, as you display each &#060;%=rs("Points") %&#062;, put in the code:<BR>&#060;% pointsTotal = pointsTotal + rs("Points") %&#062;<BR><BR>Then, you can display pointsTotal wherever you want.

3. Join Date
Dec 1969
Posts
56

## RE: Why not do it server-side?

4. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## You know, looking at your..

.. code, why aren&#039;t you using a loop to display each record?<BR><BR>And, you are only incrementing pointsTotal in that last bit of code, not in each place you display a record.<BR><BR>And, I don&#039;t see where you are actually displaying pointsTotal.

5. Join Date
Dec 1969
Posts
56

## RE: You know, looking at your..

When i used aloop it didnt work right, but the code works great.<BR>I would like to display the points toatal in the last &#060;tr&#062; section were i but your code, i thought that would display it, but know i see that you have to use that in each &#060;%= rs("Points") %&#062; right? and then display it were i want or no?

6. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## RE: You know, looking at your..

You have to increment it each time you do:<BR>&#060;%=rs("Points") %&#062;<BR>&#060;% pointsTotal = pointsTotal + rs("Points") %&#062;<BR><BR>And, you can display it wherever you want by doing:<BR>&#060;%=pointsTotal %&#062;

7. Join Date
Dec 1969
Posts
56

## RE: That works great thank you.

That works great. Thanks for your help once again, i wish there was something i could do for you.<BR><BR> LordTwisted

8. God
Senior Member
Join Date
Dec 1969
Posts
18,177

.. are always appreciated!<BR><BR>Hehe.<BR><BR>j/k.

9. Join Date
Dec 1969
Posts
56

## :) lol Do you actually work for 4guysfromrolo or

Do you actually work for 4guysfromrolo or do you just come in here and help poeple? Really if there is something i can do for you let me know, if you need some Graphics done, or if your into fantasy football i can hook you up for next year on my site, it will be all databased driven. i appricate all the help you guys give, it kinda sucks that i get all this help and there is nothing i can do in return!<BR><BR> LordTwisted

10. God
Senior Member
Join Date
Dec 1969
Posts
18,177

## Nope. None of us work for..

.. 4guysfromrolla.com. Except, maybe Scott Mitchell.<BR><BR>The rest of us a here for the fun of it.<BR><BR>Good luck in what you do.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•