<?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: Active Record and the IN clause</title>
	<atom:link href="http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/</link>
	<description></description>
	<lastBuildDate>Wed, 08 Sep 2010 15:38:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Attack of the Sunswirl! &#187; Blog Archive &#187; Using Rails ActiveRecord to Find &#8216;where in&#8217; a Set</title>
		<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/#comment-64013</link>
		<dc:creator>Attack of the Sunswirl! &#187; Blog Archive &#187; Using Rails ActiveRecord to Find &#8216;where in&#8217; a Set</dc:creator>
		<pubDate>Fri, 16 Nov 2007 04:55:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.almosteffortless.com/2007/03/25/active-record-and-the-in-clause/#comment-64013</guid>
		<description>[...] an invalid query according to MySQL, at least&#8230; that&#8217;s been my experience in PHP. But I stumbled upon a solution that works quite well (from the [...]</description>
		<content:encoded><![CDATA[<p>[...] an invalid query according to MySQL, at least&#8230; that&#8217;s been my experience in PHP. But I stumbled upon a solution that works quite well (from the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/#comment-40046</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Thu, 10 May 2007 05:35:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.almosteffortless.com/2007/03/25/active-record-and-the-in-clause/#comment-40046</guid>
		<description>Duncan, that&#039;s nice to know! Thanks for your comment.</description>
		<content:encoded><![CDATA[<p>Duncan, that&#8217;s nice to know! Thanks for your comment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duncan Beevers</title>
		<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/#comment-36696</link>
		<dc:creator>Duncan Beevers</dc:creator>
		<pubDate>Wed, 25 Apr 2007 02:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.almosteffortless.com/2007/03/25/active-record-and-the-in-clause/#comment-36696</guid>
		<description>Though currently undocumented, using the hash conditions syntax, you can construct IN clauses by using array values to your condition keys.

Topic.find(:all, :conditions =&gt; { :forum_id =&gt; @forums.map(&amp;:id) })

Check out what you can do with Ranges values too!

Pretty neat.</description>
		<content:encoded><![CDATA[<p>Though currently undocumented, using the hash conditions syntax, you can construct IN clauses by using array values to your condition keys.</p>
<p>Topic.find(:all, :conditions =&gt; { :forum_id =&gt; @forums.map(&amp;:id) })</p>
<p>Check out what you can do with Ranges values too!</p>
<p>Pretty neat.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/#comment-32311</link>
		<dc:creator>Trevor</dc:creator>
		<pubDate>Tue, 03 Apr 2007 22:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.almosteffortless.com/2007/03/25/active-record-and-the-in-clause/#comment-32311</guid>
		<description>Thanks for the tip, aaron. You&#039;re totally right - I can&#039;t believe I forgot about that Rails helper. 

In any case, I&#039;m sure this collection trick will come in handy sooner or later.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip, aaron. You&#8217;re totally right &#8211; I can&#8217;t believe I forgot about that Rails helper. </p>
<p>In any case, I&#8217;m sure this collection trick will come in handy sooner or later.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aaron</title>
		<link>http://trevorturk.com/2007/03/19/active-record-and-the-in-clause/#comment-32237</link>
		<dc:creator>aaron</dc:creator>
		<pubDate>Tue, 03 Apr 2007 15:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.almosteffortless.com/2007/03/25/active-record-and-the-in-clause/#comment-32237</guid>
		<description>would you consider using:

category = Category.find(params[:id])
@forums = Forum.find_all_by_category_id(@category.id)
@topics = @forums.topics</description>
		<content:encoded><![CDATA[<p>would you consider using:</p>
<p>category = Category.find(params[:id])<br />
@forums = Forum.find_all_by_category_id(@category.id)<br />
@topics = @forums.topics</p>
]]></content:encoded>
	</item>
</channel>
</rss>
