<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>find_by_sql &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/find_by_sql/</link>
	<description>Feed of posts on WordPress.com tagged "find_by_sql"</description>
	<pubDate>Sun, 06 Dec 2009 22:08:02 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[ActiveRecord find_by_sql]]></title>
<link>http://bandwagonblog.wordpress.com/2009/01/24/activerecord-find_by_sql/</link>
<pubDate>Sun, 25 Jan 2009 00:35:17 +0000</pubDate>
<dc:creator>bandwagonblog</dc:creator>
<guid>http://bandwagonblog.wordpress.com/2009/01/24/activerecord-find_by_sql/</guid>
<description><![CDATA[ActiveRecord&#8217;s find_by_sql class method takes SQL as an input to return an array of ActiveReco]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>ActiveRecord&#8217;s find_by_sql class method takes SQL as an input to return an array of ActiveRecord objects based on the results.  Only use this method when you really need it, because it does not take advantage of the abstractions provided to you to stay database agnostic.  In other words, City.find(:all) is nicer than City.find_by_sql( &#8220;select * from cities&#8221; ).  City.find(:all, :conditions =&#62; ["name like ?", "#{param}%"]) is better than City.find_by_sql( &#8220;select * from cities where code like #{param}&#8221;).</p>
<p>Rails will sanitize SQL, as long as you parameterize your query (use ? tokens).  This prevents your application from being exposed to SQL injection hacks.  Your SQL will be executed with the connection.select_all method, and ActiveRecord&#8217;s initialize method will be used on each of the results.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Using FIND Methods in RAILS::ACTIVERECORD]]></title>
<link>http://railsvoice.wordpress.com/2008/09/08/using-find-methods-in-railsactiverecord/</link>
<pubDate>Mon, 08 Sep 2008 04:57:18 +0000</pubDate>
<dc:creator>heurionconsulting</dc:creator>
<guid>http://railsvoice.wordpress.com/2008/09/08/using-find-methods-in-railsactiverecord/</guid>
<description><![CDATA[All of us know that we can use multiple Find methods to get information from the database via models]]></description>
<content:encoded><![CDATA[All of us know that we can use multiple Find methods to get information from the database via models]]></content:encoded>
</item>

</channel>
</rss>
