Programmers for Hire
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsOtherProgrammers for Hire

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 25th, 2006, 09:39 AM
aahmed1972's Avatar
aahmed1972 aahmed1972 is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2005
Posts: 302 aahmed1972 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 Days 15 h 9 m 4 sec
Reputation Power: 4
Send a message via Yahoo to aahmed1972
Displaying all or last 30 comments

I am trying to create two links in ASP, one will display all the comments and the other will display on last 30 days comments, here is what I have done, can anyone please tell me what i am doing wrong.

Code:
<% IF history = 1 THEN %> 
		<a id="parfont" href="topAccountsDetail.asp?cwmgroupkey=<%=replace(CWMGroupKey,"&","ampersand")%>&pc=<%=request.querystring("pc")%>&page=<%=back_page%>&hist=0&list=<%=request.querystring("list")%>&sort=<%=request.querystring("sort")%>">Hide History</a>
		<% ELSE %>
		<a id="parfont" href="topAccountsDetail.asp?cwmgroupkey=<%=replace(CWMGroupKey,"&","ampersand")%>&pc=<%=request.querystring("pc")%>&page=<%=back_page%>&hist=1&list=<%=request.querystring("list")%>&sort=<%=request.querystring("sort")%>">View All History</a>
        <a id="parfont" href="topAccountsDetail.asp?cwmgroupkey=<%=replace(CWMGroupKey,"&","ampersand")%>&pc=<%=request.querystring("pc")%>&page=<%=back_page%>&hist=1&list=<%=request.querystring("list")%>&sort=<%=request.querystring("sort")%>">View All History</a>

	  <% End IF%>
	
    <table align="left" BORDER=1 id="parfont" cellspacing="0" cellpadding="0">
		<tr><td colspan=4 align="center"><strong><h5>Comments</h5></strong></td></tr>
    <%
    IF history = 1 THEN
    	SQL = "select [date], comment, userID, firstname, lastname from top2000_details_comments" & _
      	" where top2000_details_comments.cwmgroupkey = '" & CWMGroupKey & "' and ProfileClass = '" & request.Querystring("pc") & "' order by [date] asc"
    	set RS = server.createobject("ADODB.Recordset")
    	RS.open SQL, CMS, 2, 2
    	
			'essentially, this checks if there are records in the table.  if so, it draws the table header
			if not rs.eof then
			
		%>

Reply With Quote
Reply

Viewing: ASP Free ForumsOtherProgrammers for Hire > Displaying all or last 30 comments


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT