<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/php/tags/Yii</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Thu, 23 May 2013 06:04:10 GMT</pubDate>
<item>
<title>(PHP) YII Model beforeSave() action - rahulprasad</title>
<link>http://snipplr.com/view/70791/yii-model-beforesave-action/</link>
<description><![CDATA[ <p>beforeSave() function is called before a model is saved.
Based on isNewRecord properly we can autosave data to some of the field(s)</p> ]]></description>
<pubDate>Mon, 15 Apr 2013 16:55:43 GMT</pubDate>
<guid>http://snipplr.com/view/70791/yii-model-beforesave-action/</guid>
</item>
<item>
<title>(PHP) Yii: Ajax sorting on STAT relations - drock</title>
<link>http://snipplr.com/view/66120/yii-ajax-sorting-on-stat-relations/</link>
<description><![CDATA[ <p>When setting up the AJAX click to sort links for your index pages, it's nice to be able to sort on STAT and related data. 

To get related data sorting in my CListView, I ended up having to forget about using "together" and "with" in my search function, and instead let everything lazy load. The number of queries explode, which sucks.

For handling your STAT relations, you can manually write SQL that runs when the sorting links are clicked. So this is pretty much duplicate code and sloppy, but it works.

The query below recreated this relation that exists on the model:

'followersCount'=>array(self::STAT,'GraphEdge','end','condition'=>'status=1'),


The naming here doesn't matter, the relation and sortable attribute are unfortunately independent. This was written for CListView but probably works with CGridView as well.
Don't forget to add followers_count to your List View's sortable attributes array.</p> ]]></description>
<pubDate>Fri, 13 Jul 2012 10:08:36 GMT</pubDate>
<guid>http://snipplr.com/view/66120/yii-ajax-sorting-on-stat-relations/</guid>
</item>
<item>
<title>(PHP) Yii: Using MySQL\'s IN condition with Active Record - drock</title>
<link>http://snipplr.com/view/65696/yii-using-mysqls-in-condition-with-active-record/</link>
<description><![CDATA[ <p>When working with your model's search function or just grabbing some data with findAll, you can't add an IN condition to your condition clause. Fail:
$criteria->condition = 'start=:startID AND end=:endID AND status IN (1,2,3)'; 

Instead, use addInCondition:</p> ]]></description>
<pubDate>Tue, 19 Jun 2012 00:13:27 GMT</pubDate>
<guid>http://snipplr.com/view/65696/yii-using-mysqls-in-condition-with-active-record/</guid>
</item>
<item>
<title>(PHP) Incluir archivos CSS y JS en Yii - jmmoreno</title>
<link>http://snipplr.com/view/64645/incluir-archivos-css-y-js-en-yii/</link>
<description><![CDATA[ <p>Este código nos permite incluir archivos JS y CSS en los views</p> ]]></description>
<pubDate>Thu, 19 Apr 2012 16:49:00 GMT</pubDate>
<guid>http://snipplr.com/view/64645/incluir-archivos-css-y-js-en-yii/</guid>
</item>
<item>
<title>(PHP) Include CSS,javascript file in Yii - mathsonic</title>
<link>http://snipplr.com/view/59927/include-cssjavascript-file-in-yii/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Tue, 18 Oct 2011 19:13:12 GMT</pubDate>
<guid>http://snipplr.com/view/59927/include-cssjavascript-file-in-yii/</guid>
</item>
<item>
<title>(PHP) Yii theme elements access - xavsio4</title>
<link>http://snipplr.com/view/54419/yii-theme-elements-access/</link>
<description><![CDATA[ <p>To access assets of a theme</p> ]]></description>
<pubDate>Thu, 26 May 2011 18:44:36 GMT</pubDate>
<guid>http://snipplr.com/view/54419/yii-theme-elements-access/</guid>
</item>
<item>
<title>(PHP) Change Page Title and Meta Tags for SEO in Yii - techstroke</title>
<link>http://snipplr.com/view/53012/change-page-title-and-meta-tags-for-seo-in-yii/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Wed, 04 May 2011 23:54:15 GMT</pubDate>
<guid>http://snipplr.com/view/53012/change-page-title-and-meta-tags-for-seo-in-yii/</guid>
</item>
<item>
<title>(PHP) Yii &amp;amp; user module : get the current user id - xavsio4</title>
<link>http://snipplr.com/view/38534/yii--user-module--get-the-current-user-id/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 05 Aug 2010 20:41:29 GMT</pubDate>
<guid>http://snipplr.com/view/38534/yii--user-module--get-the-current-user-id/</guid>
</item>
<item>
<title>(PHP) Yii Relations - xavsio4</title>
<link>http://snipplr.com/view/38532/yii-relations/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 05 Aug 2010 20:23:36 GMT</pubDate>
<guid>http://snipplr.com/view/38532/yii-relations/</guid>
</item>
<item>
<title>(PHP) Yii DropDownlist - xavsio4</title>
<link>http://snipplr.com/view/38529/yii-dropdownlist/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 05 Aug 2010 19:20:51 GMT</pubDate>
<guid>http://snipplr.com/view/38529/yii-dropdownlist/</guid>
</item>
</channel>
</rss>