<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Trick for the Newbies</title>
	<atom:link href="http://www.sitepoint.com/blogs/2004/08/04/trick-for-the-newbies/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2004/08/04/trick-for-the-newbies/</link>
	<description>News, opinion, and fresh thinking for web developers and designers. The official podcast of sitepoint.com.</description>
	<lastBuildDate>Fri, 19 Mar 2010 02:31:55 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scott Barnes</title>
		<link>http://www.sitepoint.com/blogs/2004/08/04/trick-for-the-newbies/comment-page-1/#comment-7983</link>
		<dc:creator>Scott Barnes</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">236103637#comment-7983</guid>
		<description>&lt;p&gt;You can also achieve the same result but actually faster then the &quot;group&quot; attribute by doing this:&lt;/p&gt;

&lt;p&gt;&lt;cfoutput query=&quot;q&quot;&gt;&lt;br /&gt;
&lt;cfset pRow = currentRow-1&gt;&lt;br /&gt;
&lt;cfset nRow = currentRow+1&gt;&lt;/p&gt;

&lt;p&gt;&lt;cfif groupField[nRow] NEQ groupField[currentRow]&gt;&lt;/p&gt;

&lt;p&gt;Start new distinction.&lt;/p&gt;

&lt;p&gt;&lt;br /&gt;
&lt;/cfoutput&gt;&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>You can also achieve the same result but actually faster then the &#8220;group&#8221; attribute by doing this:</p>
<p><cfoutput query="q"><br />
<cfset pRow = currentRow-1><br />
</cfset><cfset nRow = currentRow+1></cfset></cfoutput></p>
<p><cfif groupField[nRow] NEQ groupField[currentRow]></cfif></p>
<p>Start new distinction.</p>
<p>
</p>]]></content:encoded>
	</item>
	<item>
		<title>By: PaulWeston</title>
		<link>http://www.sitepoint.com/blogs/2004/08/04/trick-for-the-newbies/comment-page-1/#comment-7984</link>
		<dc:creator>PaulWeston</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">236103637#comment-7984</guid>
		<description>&lt;p&gt;That cfoutput query=&#039;x&#039; stuff I tried a while ago and ended up with some considerable problems.  It looks neater but there is a nasty side effect on queries inside queries.  If you have a very complex scripted page and have a few of these embedded in another cfoutput query=&#039;x&#039; type scenario you end up with strange results.  I used to have a test piece of code that proved this in about twenty lines.  The same issue occured from CF 4.5 through to 6.1.&lt;/p&gt;

&lt;p&gt;I now treat the resultset like an array.  It has never failed since.  If you&#039;re only going down 1 level (ie not nested) then there is no problem and your way works fine.&lt;/p&gt;

&lt;p&gt;I&#039;d like to be able to claim I discovered this &#039;feature&#039; on my own but it was after a bit of Googling around, someone out there broke it down why I was having problems and it all then made sense.  I&#039;ve lost the link but it&#039;s out there somewhere.&lt;/p&gt;

&lt;p&gt;- PaulWeston&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>That cfoutput query=&#8217;x&#8217; stuff I tried a while ago and ended up with some considerable problems.  It looks neater but there is a nasty side effect on queries inside queries.  If you have a very complex scripted page and have a few of these embedded in another cfoutput query=&#8217;x&#8217; type scenario you end up with strange results.  I used to have a test piece of code that proved this in about twenty lines.  The same issue occured from CF 4.5 through to 6.1.</p>
<p>I now treat the resultset like an array.  It has never failed since.  If you&#8217;re only going down 1 level (ie not nested) then there is no problem and your way works fine.</p>
<p>I&#8217;d like to be able to claim I discovered this &#8216;feature&#8217; on my own but it was after a bit of Googling around, someone out there broke it down why I was having problems and it all then made sense.  I&#8217;ve lost the link but it&#8217;s out there somewhere.</p>
<p>- PaulWeston</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://www.sitepoint.com/blogs/2004/08/04/trick-for-the-newbies/comment-page-1/#comment-7985</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Tue, 30 Nov 1999 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">236103637#comment-7985</guid>
		<description>&lt;p&gt;A lot of times problems with nested CFQUERIES can be solved by always scoping your query variables. For instance: Query1.Firstname, Query2.Firstname. This way you will never have variable collision...if that was the strange result you were experiencing. I remember having this problem back in CF 4.0 before I knew about scope.&lt;/p&gt;

</description>
		<content:encoded><![CDATA[<p>A lot of times problems with nested CFQUERIES can be solved by always scoping your query variables. For instance: Query1.Firstname, Query2.Firstname. This way you will never have variable collision&#8230;if that was the strange result you were experiencing. I remember having this problem back in CF 4.0 before I knew about scope.</p>]]></content:encoded>
	</item>
</channel>
</rss>
