Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Any way to do this in VBscript ??

Status
Not open for further replies.

DOGWATCH

Programmer
Mar 11, 2004
120
US
Hello, I am writing a sql query that will return values
that I will display in a HTML table

it will be structuers somewhat like

LA CHI NY Total
wiget1 20 10 15 45
wiget2 10 5 20 35
wiget3 30 1 40 71

totals 60 16 75 151


The values for each city will be calcuated by my query
I am just wondering if there is something I can do in
vb script that will just sum up rows in a html table
and give me the totals as shown both vertically and horizontally.

I supose i could progam the query to sum that part up for me but I am wondering if you can just do this calucation on the web page.

Is there a way ???


 
If you use recordset it should be easy to implement.
What have you so far ?

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
If you have used multidimensional arrays before, you could implement them that way as well......
 
I'd say just create some extra totals variables that you calculate (add to) within your looping.

Best regards,
J. Paul Schmidt, Freelance ASP Web Consultant
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top