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
    New Coder
    Join Date
    Mar 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I need to loop through the months and call the sp each time per month.

    Hello,

    I have this function, but can't seem to loop it correctly to display the results.

    Code:
    Function fGetMemberSearchPageStats(iMemberId, iLogType, strTimePeriod, dtReqDate)
    	Dim rsLog, iResult
    	Set rsLog = Conn.Execute("spGetMemberProfileHits " & iMemberId & ", " & iLogType & ", '" & strTimePeriod & "', '" & dtReqDate & "' ")	
    	If Not rsLog.EOF Then
    		iResult = rsLog.Fields("hit_count")
    	End If
    	Set rsLog = Nothing
    	fGetMemberSearchPageStats = iResult
    End Function
    so anyways, I want to loop through the months and show the results of the users search results....

    Code:
    <%
    '' sp Arguments - Member Number, Log Type, DatePeriod, Requested Date
    iMonthCount = fGetMemberSearchPageStats(iMemberId, 1, "month", "04/01/06")
    
    %>
    I want to pop them in to a table once its all said in done.

    Code:
    if iMonthCount = fGetMemberSearchPageStats(iMemberId, 1, "month", "01/01/06" Then <%=iMonthCount %> Else If iMonthCount = fGetMemberSearchPageStats(iMemberIf, 1, "month", " 02/01/06" then  <%=iMonthCount %>
    I know that logic is totally invalid, but what would make this more helpful for me?

    I appreciate you help.

  • #2
    New Coder
    Join Date
    Mar 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Would it best to use a For Each...Next Statement?

    Thanks!

  • #3
    Registered User
    Join Date
    Jan 2006
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I read through it and want to help, but just don't really understand what's going on.


  •  

    Posting Permissions

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