Hi,
I'm trying to create a stats web application using ASP. I've ran a query on my database to extract the information I require and this works fine.
The data I have extracted can either be a number between 1 and 5. I need to count up the number of 1's, 2's, 3's etc.
The loop I have written is:
<%
Do until objrs.eof
if objrs = 1 then
one + 1
end if
if objrs = 2 then
two + 1
end if
if objrs = 3 then
three + 1
end if
if objrs = 4 then
four + 1
end if
if objrs = 5 then
five + 1
end if
objrs.movenext
Loop
%>
Is this the right way to go about it?
Please help.
Pilg!
I'm trying to create a stats web application using ASP. I've ran a query on my database to extract the information I require and this works fine.
The data I have extracted can either be a number between 1 and 5. I need to count up the number of 1's, 2's, 3's etc.
The loop I have written is:
<%
Do until objrs.eof
if objrs = 1 then
one + 1
end if
if objrs = 2 then
two + 1
end if
if objrs = 3 then
three + 1
end if
if objrs = 4 then
four + 1
end if
if objrs = 5 then
five + 1
end if
objrs.movenext
Loop
%>
Is this the right way to go about it?
Please help.
Pilg!