it's because the CFOUTPUT doesn't have a queryname attached. any references to searchresults.fieldname will refer to the first record returned from that query (as correctly mentioned previously be several responses.)
chris -----Original Message----- From: Doherty,Sean [NCR] [mailto:[EMAIL PROTECTED]] Sent: Friday, July 26, 2002 3:33 PM To: CF-Talk Subject: RE: record linking prob here is the whole file ... not sure exactly what you want ... still learning here =) . i need to sit down and go through it to see why it now works <cfset CurrentPage=GetFileFromPath(GetTemplatePath())> <cfparam name="PageNum_searchResults" default="1"> <cfquery name="searchResults" datasource="perd"> SELECT * FROM RecordTable ORDER BY Title ASC </cfquery> <cfset MaxRows_searchResults=10> <cfset StartRow_searchResults=Min((PageNum_searchResults-1)*MaxRows_searchResults+1 ,Max(searchResults.RecordCount,1))> <cfset EndRow_searchResults=Min(StartRow_searchResults+MaxRows_searchResults-1,sear chResults.RecordCount)> <cfset TotalPages_searchResults=Ceiling(searchResults.RecordCount/MaxRows_searchRes ults)> <cfset QueryString_searchResults=Iif(CGI.QUERY_STRING NEQ "",DE("&"&CGI.QUERY_STRING),DE(""))> <cfset tempPos=ListContainsNoCase(QueryString_searchResults,"PageNum_searchResults= ","&")> <cfif tempPos NEQ 0> <cfset QueryString_searchResults=ListDeleteAt(QueryString_searchResults,tempPos,"&" )> </cfif> <html> <head> <title>Material Results</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><font color="#00CACA" size="7" face="Times New Roman, Times, serif"><strong><em>Material</em></strong></font> <font size="5">RESULTS</font> </td> </tr> <tr> <td> <hr></td> </tr> </table> </p> <cfoutput> <table border="0" width="100%" align="center"> <tr> <td width="20%" align="center"><div align="left">Records #StartRow_searchResults# to #EndRow_searchResults# of #searchResults.RecordCount# </div></td> <td width="18%" align="center"> <div align="left"> <cfif PageNum_searchResults LT TotalPages_searchResults> <a href="#CurrentPage#?PageNum_searchResults=#Min(IncrementValue(PageNum_search Results),TotalPages_searchResults)##QueryString_searchResults#"><Next> </a> </cfif> </div></td> <td width="62%" align="center"> <div align="left"> <cfif PageNum_searchResults GT 1> <a href="#CurrentPage#?PageNum_searchResults=#Max(DecrementValue(PageNum_search Results),1)##QueryString_searchResults#"><Previous></a> </cfif> </div></td> </tr> </table> <br> </cfoutput> <table width="100%" border="1" align="center"> <tr bgcolor="#CCCCCC"> <td width="53%"><strong>Title</strong></td> <td width="28%"><strong>Author</strong></td> <td width="19%"><strong>Date</strong></td> </tr> <cfoutput query="searchResults" startRow="#StartRow_searchResults#" maxRows="#MaxRows_searchResults#"> <tr> <td><a href="matdetails.cfm?recordID=#searchResults.RecordId#">#searchResults.Title # </a></td> <td>#searchResults.Author# </td> <td>#dateformat(searchResults.Date, "yyyy/mm/dd")# </td> </tr> </cfoutput> </table> <br><cfoutput> <table border="0" width="100%" align="left"> <tr> <td width="20%" align="center"><div align="left">Records #StartRow_searchResults# to #EndRow_searchResults# of #searchResults.RecordCount# </div></td> <td width="18%" align="center"> <div align="left"> <cfif PageNum_searchResults LT TotalPages_searchResults> <a href="#CurrentPage#?PageNum_searchResults=#Min(IncrementValue(PageNum_search Results),TotalPages_searchResults)##QueryString_searchResults#"><Next> </a> </cfif> </div></td> <td width="62%" align="center"> <div align="left"> <cfif PageNum_searchResults GT 1> <a href="#CurrentPage#?PageNum_searchResults=#Max(DecrementValue(PageNum_search Results),1)##QueryString_searchResults#"><Previous></a> </cfif> </div></td> </tr> </table> <br> </cfoutput> <br> <cfoutput> </cfoutput> </body> </html> ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

