You can make the returning query smaller ( from your sql server to CF ) by using sql:
select * from daily_tip where tipdate <= #today# order by tipdate desc limit 7 The limit 7 is specific to mysql in MSSQL its select top 7 * from daily_tip where tipdate <= #today# order by tipdate desc Paul. On 08/11/2008, at 1:37 AM, John Barrett wrote: > Hi Dave, > Thanks so much for your help:) > when I add > <cfquery name="rs_dailytip" maxrows="7" > datasource="#REQUEST.dataSource#"> > SELECT * > FROM daily_tip > where tipdate <= #today# > ORDER BY tipdate DESC > </cfquery> > > This works great. > The issue that I am having this page grows by one everyday. That > is, the original daily tip is on the index page, and then the next > when I new one is add to the index page, the old one is displayed > here. > Therefore, I do not know how many days to display here. Well now I > now there are 21 entries, but in the future this will change, and > so I am hoping to make the cfquery dynamic. > > Thanks again for your help`-` > John > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:4141 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
