Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Problem with a Poll Im designing...

Options
  • 14-03-2007 1:11pm
    #1
    Registered Users Posts: 224 ✭✭


    Hi all,

    Im creating a poll using asp. I got this neat bit of code from the net...


    <%
    'Get Poll Results using Filter
    Dim arrCount(1000)
    For i = 1 to 1000
    FilterParam = i
    rsQryPoll.Filter = "ItemID = " & FilterParam
    'Count results
    While NOT rsQryPoll.EOF
    arrCount(i) = arrCount(i) + 1
    rsQryPoll.MoveNext()
    Wend
    Next
    %>


    <td><div align="center"><%=FormatNumber((arrCount(352)/rsQryPoll_total*100), 2, -2, -2, -2)%>%</div></td>

    So my problem is im trying to make it dynamic so I dont have to manually enter in the above 2nd snippet for every item in the poll. "352" is the itemid.
    This is the field Im trying to work into the code instead of 352.
    <%=(rsItemDetails.Fields.Item("ItemID").Value)%>

    Any suggestions....


Advertisement