<?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"
	>
<channel>
	<title>Comments on: Cakephp 1.2 Filter Component</title>
	<atom:link href="http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/</link>
	<description>Webware and Rich Internet Applications</description>
	<pubDate>Sun, 05 Feb 2012 06:21:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: kamil</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-405</link>
		<dc:creator>kamil</dc:creator>
		<pubDate>Sun, 08 Jan 2012 13:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-405</guid>
		<description>Witam, gdzie co mam powklejac, mam narazie prosta tabele users a w niej id,lastname,firstname,pesel,phone gdzie mam co powklejac tak by dzialalo filtrowanie, dodam ze jestem poczatkujacy pozdrawiam i dzieki za pomoc. </description>
		<content:encoded><![CDATA[<p>Witam, gdzie co mam powklejac, mam narazie prosta tabele users a w niej id,lastname,firstname,pesel,phone gdzie mam co powklejac tak by dzialalo filtrowanie, dodam ze jestem poczatkujacy pozdrawiam i dzieki za pomoc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gdfgdfre</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-402</link>
		<dc:creator>gdfgdfre</dc:creator>
		<pubDate>Thu, 08 Sep 2011 09:30:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-402</guid>
		<description>we&#039;ll keep the tree and try to pick up the fruit as it falls, so it doesn&#039;t smell too bad in the autumn &lt;a href="http://.http://www.viviennewestwoodonline.info" target="_blank"&gt;.http://www.viviennewestwoodonline.info&lt;/a&gt;      &lt;a href="http://www.ghdivstyler.org" target="_blank"&gt;http://www.ghdivstyler.org&lt;/a&gt; </description>
		<content:encoded><![CDATA[<p>we&#039;ll keep the tree and try to pick up the fruit as it falls, so it doesn&#039;t smell too bad in the autumn <a href="http://.http://www.viviennewestwoodonline.info" target="_blank">.http://www.viviennewestwoodonline.info</a>      <a href="http://www.ghdivstyler.org" target="_blank">http://www.ghdivstyler.org</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gdfgdfre</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-401</link>
		<dc:creator>gdfgdfre</dc:creator>
		<pubDate>Thu, 08 Sep 2011 09:23:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-401</guid>
		<description>Here is the complete code I am using:Here is the complete code I am using: 
 
function removeFromArray(string, array) 
 
function removeFromArray(string, array) </description>
		<content:encoded><![CDATA[<p>Here is the complete code I am using:Here is the complete code I am using: </p>
<p>function removeFromArray(string, array) </p>
<p>function removeFromArray(string, array)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gdfgdfre</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-400</link>
		<dc:creator>gdfgdfre</dc:creator>
		<pubDate>Thu, 08 Sep 2011 09:22:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-400</guid>
		<description>what if I want to remove (with no spaces left) every element in my array that includes the letters &#8220;CE&#8221; anywhere in the element? </description>
		<content:encoded><![CDATA[<p>what if I want to remove (with no spaces left) every element in my array that includes the letters &ldquo;CE&rdquo; anywhere in the element?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-395</link>
		<dc:creator>Eugene</dc:creator>
		<pubDate>Thu, 21 Jul 2011 13:50:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-395</guid>
		<description>Since I wanSince I wanted my search to be case insensitive, I changed a couple of lines. 
 
Where you defined the field formats, I changed it to  
var $fieldFormatting    = array( 
&#34;string&#34; =&#62; &#34;LIKE upper(&#039;%%%s%%&#039;)&#34;, 
&#34;text&#34; =&#62; &#34;LIKE upper(&#039;%%%s%%&#039;)&#34;, 
&#34;date&#34; =&#62; &#34;&#039;%s&#039;&#34; 
); 
 
Where you place everything into array I now have 
$ret[] = &#039;upper(&#039;.$key.&#039;.&#039;.$k.&#039;)&#039; . &#34; &#34; .  sprintf($this-&#62;fieldFormatting[$columns[$k]], $v); 
 
Instead of  
 
$ret[] = $key.&#039;.&#039;.$k . &#34; &#34; .  sprintf($this-&#62;fieldFormatting[$columns[$k]], $v) ; 
 </description>
		<content:encoded><![CDATA[<p>Since I wanSince I wanted my search to be case insensitive, I changed a couple of lines. </p>
<p>Where you defined the field formats, I changed it to<br />
var $fieldFormatting    = array(<br />
&quot;string&quot; =&gt; &quot;LIKE upper(&#039;%%%s%%&#039;)&quot;,<br />
&quot;text&quot; =&gt; &quot;LIKE upper(&#039;%%%s%%&#039;)&quot;,<br />
&quot;date&quot; =&gt; &quot;&#039;%s&#039;&quot;<br />
); </p>
<p>Where you place everything into array I now have<br />
$ret[] = &#039;upper(&#039;.$key.&#039;.&#039;.$k.&#039;)&#039; . &quot; &quot; .  sprintf($this-&gt;fieldFormatting[$columns[$k]], $v); </p>
<p>Instead of  </p>
<p>$ret[] = $key.&#039;.&#039;.$k . &quot; &quot; .  sprintf($this-&gt;fieldFormatting[$columns[$k]], $v) ;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ITtuition.com</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-375</link>
		<dc:creator>ITtuition.com</dc:creator>
		<pubDate>Sat, 22 Jan 2011 14:48:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-375</guid>
		<description>One of a few good posts on filtering. Thanks! </description>
		<content:encoded><![CDATA[<p>One of a few good posts on filtering. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-347</link>
		<dc:creator>Billy</dc:creator>
		<pubDate>Thu, 21 Oct 2010 22:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-347</guid>
		<description>I&#039;m having trouble in the view. Getting an error &#039;Undefined property: View::$Filter&#039; I have the component filter.php file and have added the component into the controller :( </description>
		<content:encoded><![CDATA[<p>I&#039;m having trouble in the view. Getting an error &#039;Undefined property: View::$Filter&#039; I have the component filter.php file and have added the component into the controller <img src='http://blog.uplevel.pl/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitry</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-303</link>
		<dc:creator>Dmitry</dc:creator>
		<pubDate>Wed, 04 Aug 2010 07:34:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-303</guid>
		<description>Hello Maciej, 
 
what should be changed in the component to replace all &#34;AND&#34; with &#34;OR&#34;? 
 
Regards, 
Dmitry  </description>
		<content:encoded><![CDATA[<p>Hello Maciej, </p>
<p>what should be changed in the component to replace all &quot;AND&quot; with &quot;OR&quot;? </p>
<p>Regards,<br />
Dmitry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitry</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-302</link>
		<dc:creator>Dmitry</dc:creator>
		<pubDate>Wed, 04 Aug 2010 07:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-302</guid>
		<description>Hello John, 
 
did you find the solution? What should be changed in the component to replace all &#34;AND&#34; with &#34;OR&#34;? 
 
Regards, 
Dmitry </description>
		<content:encoded><![CDATA[<p>Hello John, </p>
<p>did you find the solution? What should be changed in the component to replace all &quot;AND&quot; with &quot;OR&quot;? </p>
<p>Regards,<br />
Dmitry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitry</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-297</link>
		<dc:creator>Dimitry</dc:creator>
		<pubDate>Tue, 08 Jun 2010 10:42:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-297</guid>
		<description>What should be written in the index() in the Controller if I have belongsTo Model? 
 
For example I have a model  
class A extends AppModel { 
        var $name = &#039;A&#039;; 
        var $belongsTo =  array( 
                                 &#039;B&#039; =&#62; array( 
                                 &#039;className&#039; =&#62; &#039;B&#039;, 
                                 &#039;foreignKey&#039; =&#62; &#039;b_id&#039; 
                                ) 
        ); 
} 
 
In the controller I try 
$filter = $this-&#62;Filter-&#62;process($this, array(&#039;id&#039;,&#039;b_id&#039;)); 
 
index.ctp: 
&#60;?php echo $this-&#62;Form-&#62;create(&#039;A&#039;,array(&#039;url&#039;=&#62;array(&#039;action&#039;=&#62;&#039;index&#039;)));?&#62; 
&#60;?php echo $this-&#62;Form-&#62;input(&#039;id&#039;);?&#62; 
&#60;?php echo $this-&#62;Form-&#62;input(&#039;b_id&#039;);?&#62; 
&#60;?php echo $this-&#62;Form-&#62;end(&#039;Search&#039;);?&#62; 
... 
 
I get my combobox for b_id and wait for values in the combobox but there is nothing there. 
 
 </description>
		<content:encoded><![CDATA[<p>What should be written in the index() in the Controller if I have belongsTo Model? </p>
<p>For example I have a model<br />
class A extends AppModel {<br />
        var $name = &#039;A&#039;;<br />
        var $belongsTo =  array(<br />
                                 &#039;B&#039; =&gt; array(<br />
                                 &#039;className&#039; =&gt; &#039;B&#039;,<br />
                                 &#039;foreignKey&#039; =&gt; &#039;b_id&#039;<br />
                                )<br />
        );<br />
} </p>
<p>In the controller I try<br />
$filter = $this-&gt;Filter-&gt;process($this, array(&#039;id&#039;,&#039;b_id&#039;)); </p>
<p>index.ctp:<br />
&lt;?php echo $this-&gt;Form-&gt;create(&#039;A&#039;,array(&#039;url&#039;=&gt;array(&#039;action&#039;=&gt;&#039;index&#039;)));?&gt;<br />
&lt;?php echo $this-&gt;Form-&gt;input(&#039;id&#039;);?&gt;<br />
&lt;?php echo $this-&gt;Form-&gt;input(&#039;b_id&#039;);?&gt;<br />
&lt;?php echo $this-&gt;Form-&gt;end(&#039;Search&#039;);?&gt;<br />
&#8230; </p>
<p>I get my combobox for b_id and wait for values in the combobox but there is nothing there.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: benizra</title>
		<link>http://blog.uplevel.pl/index.php/2008/06/cakephp-12-filter-component/#comment-289</link>
		<dc:creator>benizra</dc:creator>
		<pubDate>Mon, 26 Apr 2010 23:44:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uplevel.pl/?p=39#comment-289</guid>
		<description>Thank you for this code. I made it work! </description>
		<content:encoded><![CDATA[<p>Thank you for this code. I made it work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

