Saturday, April 09, 2005

CFOUTPUT Maxrows

How do I get a CFOUTPUT to only return a certian number of results?

Setting the maxrows in the query tag is another option...

cfquery ... maxrows="45" this will work for small queries.. but may not be the best option to use because it returns all of the records of the query but will only show the maxrows that are specified in the query.

If you would like to make your query truly random, I'd suggest using:

ORDER BY NewId() -- This gives a unique order by each execution.

0 Comments:

Post a Comment

<< Home