Ask a Question related to Macromedia ColdFusion, Design and Development.
-
pnugent #1
Returning Records from <cfquery>
I would like to return a large list of records 300+ to a web page without using
frames. The problem occurs when users scroll up or down to view the records.
The title row moves up and down with the returned records. Is there a way for
the title row to remain stationary? When the row remains stationary for the
large set of records, it will need to autosize to the same column width of the
data being brought back. (hope this makes sense)
I am using CF5.
Thanks!
pnugent Guest
-
cfquery bug...still?
Hi, I have ColdFusion MX7,0,0,91690. I am trying to utilize the attached code. I am passing the query (it's easier for my implementation) in a... -
cfquery
I am trying to use debug in a query and it is a no go(should show at bottom of page). the query is working because I am getting recordcounts. Then... -
Returning a Specific number of records...
I have a query that returns all records in a table... However, I would like to bring back 'n' number of records at a time. For example, the query... -
CFQUERY with IF THEN ELSE
I have a CFQUERY which works perfectly and now I would like to add a little date calculation to this query to filter it little more. The query is a... -
Periodically returning no records
Using Coldfusion MX 6.1, SQL Server 2000: Periodically, a query will return no records, even though it's supposed to return something (verified... -
The ScareCrow #2
Re: Returning Records from <cfquery>
Instead of dispaying the whole 300+ records on the single page, only display enough to be viewed without scrolling. Then use pagenation to display the next/previous set of records.
Ken
The ScareCrow Guest
-
pnugent #3
Re: Returning Records from <cfquery>
How do i use pagenation? Is it a feature in CF?
pnugent Guest
-
The ScareCrow #4
Re: Returning Records from <cfquery>
No, it's just some code
At the top of the page
<!--- row to start output of query result set --->
<cfparam name="StartRow" default="1">
<!--- maximum number of rows to display --->
<cfparam name="MaxRows" defaylt="20">
<!-- parameter for the previously displayed records --->
<cfparam name="previous" default="0">
<!--- parameter for the next set of records to display --->
<cfparam name="next" default="0">
Then you have you cfoutput query tag, but you use the startrow and maxrows
attributes
<cfoutput query="myQuery" startrow="#startrow#" maxrows="#maxrows#">
<!--- output query resultset --->
</cfoutput>
<!-- set the parameters for the previous/next parameters --->
<cfset previous = startrow - maxrows>
<cfset next = startrow + maxrows>
Then output some links
<!--- only display the previous link if there is a previous --->
<cfif previous GT 0>
<cfoutput>
<a href="myPage.cfm?startrow=#previous#">Previous #maxrows# records</a>
</cfoutput>
</cfif>
<!--- only display the next link if there are records to display --->
<cfif next LTE myQuery.RecordCount>
<cfoutput>
<a href="myPage.cfm?startrow=#next#">Next #maxrows# records</a>
</cfoutput>
</cfif>
Ken
The ScareCrow Guest



Reply With Quote

