Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-11-2006, 05:43 PM   PM User | #1
binici
New Coder

 
Join Date: Mar 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
binici is an unknown quantity at this point
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.
binici is offline   Reply With Quote
Old 04-11-2006, 06:53 PM   PM User | #2
binici
New Coder

 
Join Date: Mar 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
binici is an unknown quantity at this point
Would it best to use a For Each...Next Statement?

Thanks!
binici is offline   Reply With Quote
Old 04-12-2006, 03:30 PM   PM User | #3
Archangel
Registered User

 
Join Date: Jan 2006
Posts: 130
Thanks: 0
Thanked 0 Times in 0 Posts
Archangel is an unknown quantity at this point
Sorry, I read through it and want to help, but just don't really understand what's going on.
Archangel is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:09 PM.


Advertisement
Log in to turn off these ads.