Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Mar 2003
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation counting the records

    Hi, in the asp script the email address get written for each value in the array like so:

    For i = 0 To UBound(garrResult, 2)

    Response.Write(garrResult(3, i))
    Next

    How could display a count of those where the email address equals something

    thanks!

  • #2
    Regular Coder
    Join Date
    Mar 2003
    Posts
    165
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow

    What i am trying to say is ...

    i have an array below thats used to create a csv file, how can i use the elements in the array to give me a count where email address doesn't exist and fax does exist. I do not wish to use this number in the csv file but rather just display it on the page. Thanks

    Response.Write("id")
    Response.Write(",")
    Response.Write("name")
    Response.Write(",")
    Response.Write("lastname")
    Response.Write(",")
    Response.Write("firstname")
    Response.Write(",")
    Response.Write("emailaddress")
    Response.Write(",")
    Response.Write("fax")
    Response.Write(vbCrLf)

    For i = 0 To UBound(garrResult, 2)
    Response.Write(garrResult(0, i)) ' ID
    Response.Write(",")
    Response.Write( Replace(garrResult(1, i), ",", "") ) ' Last Name
    Response.Write(",")
    Response.Write( Replace(garrResult(2, i), ",", "") ) ' First Name
    Response.Write(",")
    Response.Write(garrResult(3, i)) ' E-mail
    Response.Write(",")
    Response.Write(garrResult(4, i)) ' Fax

    Response.Write(vbCrLf)
    Next

  • #3
    Registered User
    Join Date
    Jan 2006
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could always add a value in your loop. On the outside dim your variable and then add it in the loop.

    Dim myCount

    For (blah blah)
    If My criteria is met then
    myCount = myCount + 1
    Loop


  •  

    Posting Permissions

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