"Kc539" <webfor...@macromedia.com> wrote in message
news:ai1r3i$pbn$1...@forums.macromedia.com...
> My problem is that this page the code is on (list.cfm) seems to need to
keep passing the #form.date# variable. As is, the page displays the links
correctly, but when page 2 which startrow=6 is clicked, the page gets the
500 internal server error & can't be displayed. How can I fix this problem?
> Here is the coding for the page:
> --------------------------------------------------------------------------
----
> <cfif isDefined('URL.StartRow')>
> <cfset StartRow=URL.StartRow>
> <cfelse>
> <cfset StartRow=1>
> </cfif>
>
> <cfquery datasource="ds" name="songs"
cachedwithin="#createTimeSpan(0,0,10,0)#">
> select * from Songs where date like '%#form.date#%'
> </cfquery>
>
> <cfset PageName="list.cfm">
> <cfset TotalRecords=songs.RecordCount>
> <cfset RecordsPerPage=5>
> <cfset NumberOfPages=Ceiling(TotalRecords/RecordsPerPage)>
> <cfset CurrentPageNumber=Ceiling(StartRow/RecordsPerPage)>
> <cfset EndRow=StartRow+RecordsPerPage-1>
>
> <cfoutput query="songs" startrow="#StartRow#"
maxrows="#RecordsPerPage#"> #flashsample# </cfoutput>
>
> <cfif NumberOfPages GT 1>
> <cfoutput> <cfif CurrentPageNumber GT 1>
> <cfset NextStartRow=StartRow - RecordsPerPage>
> <a
href="#PageName#?StartRow=#NextStartRow#">Previous</a>
> </cfif>
> <cfif CurrentPageNumber LT NumberOfPages>
> <cfset NextStartRow=StartRow + RecordsPerPage>
> <a
href="#PageName#?StartRow=#NextStartRow#">Next</a>
> </cfif>
>
> <cfloop index="Counter" from="1" to="#NumberOfPages#" step="1">
> <cfset
NextStartRow=(Counter*RecordsPerPage)-(RecordsPerPage-1)>
> <cfif Counter EQ CurrentPageNumber>#Counter#
> <cfelse>
> <a
href="#PageName#?StartRow=#NextStartRow#">#Counter#</a>
> </cfif>
> </cfloop>
>
> </cfoutput>
> </cfif>
>
>
>
Hope that helps your figure out the problem...
"Kc539" <webfor...@macromedia.com> wrote in message
news:ai1r3i$pbn$1...@forums.macromedia.com...
Thanks anyway.