Adam, RecordCount gives you the number of records in the query. I think what you are wanting is
queryname.currentRow and since it is a number just do <cfif getNewsItems.currentRow EQ 1> <cfelse> </cfif> Hope that helps J.J. On 11/19/07, Adam Parker <[EMAIL PROTECTED]> wrote: > Hi All - > > I am producing a front page of a site where I need to have the latest news > item and blog entry formatted (via CSS) differently than the later entries. > The first record of the news items and blog entry will be formatted with > background color and larger font where the later news items and entries will > be plain. I believe it has something to do with counting the records in the > query, so I've tried something like: > > <cfquery name="getNewsItems" datasource="myDSN"> > SELECT TOP 5 headline, releaseDate, id > FROM NewsItems > Order by releaseDate > </cfquery> > > <h2>News</h2> > <cfif getNewsItems.RecordCount is "1"> > <p class="news_events_feature"> > <cfoutput query="getNewsItems"> > <img src="img/hm/news_events/#id#.jpg" width="85" height="96" /> > #headline#<br /> > <a href="##" class="right"></cfoutput>Read More >></a> > </p> > > <cfelseif getNewsItems.RecordCount is not "1"> > <ol> > <li><cfoutput query="getNewsItems"><a href="##">#headline#<br /><br > /></a></cfoutput></li> > </ol> > <a href="##" class="more">More News & Events>></a> > </cfif> > > Can anyone tell me why my thinking is not correct? > > Thanks, > Adam > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3150 Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
