<?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: Using MySQL Stored Procedures in Cakephp</title>
	<atom:link href="http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/</link>
	<description>Following the Footsteps of Heros, Never Lead to the Straight and Grey Roads. (Oh, Sleeper)</description>
	<lastBuildDate>Fri, 07 May 2010 06:10:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: ZAky</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-231</link>
		<dc:creator>ZAky</dc:creator>
		<pubDate>Mon, 22 Mar 2010 11:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-231</guid>
		<description>1. @Adam don&#039;t put any thing that smell like sql outside your model, among other reasons see point 2 .
2. @ajmacaro stored procedure is the best performance choice so it&#039;s better to invest in the performance area being a 24/7 issue then investing in the ability to change database, which probably will not happen.
If you keep all your sql related syntax in the Model you can be sure to touch only your model files in case of migrating to new database type.</description>
		<content:encoded><![CDATA[<p>1. @Adam don&#8217;t put any thing that smell like sql outside your model, among other reasons see point 2 .<br />
2. @ajmacaro stored procedure is the best performance choice so it&#8217;s better to invest in the performance area being a 24/7 issue then investing in the ability to change database, which probably will not happen.<br />
If you keep all your sql related syntax in the Model you can be sure to touch only your model files in case of migrating to new database type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL procedūrų naudojimas CakePHP &#171; Labs</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-89</link>
		<dc:creator>MySQL procedūrų naudojimas CakePHP &#171; Labs</dc:creator>
		<pubDate>Fri, 03 Apr 2009 17:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-89</guid>
		<description>[...] dar neteko naudoti, bet pastebėjau gerą įrašą ta tema. Pirmiausia duomenų bazės nustatymuose (config/database.php) nustatom [...]</description>
		<content:encoded><![CDATA[<p>[...] dar neteko naudoti, bet pastebėjau gerą įrašą ta tema. Pirmiausia duomenų bazės nustatymuose (config/database.php) nustatom [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-88</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 02 Apr 2009 23:42:34 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-88</guid>
		<description>Ture. It is database specific. If I was to change from MySQL to something else I would no doubt have to spend time figuring out how to change it over.

Of course, at this stage I&#039;m more than happy making it work with MySQL, so the problem is nulified.</description>
		<content:encoded><![CDATA[<p>Ture. It is database specific. If I was to change from MySQL to something else I would no doubt have to spend time figuring out how to change it over.</p>
<p>Of course, at this stage I&#8217;m more than happy making it work with MySQL, so the problem is nulified.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ajmacaro</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-87</link>
		<dc:creator>ajmacaro</dc:creator>
		<pubDate>Thu, 02 Apr 2009 14:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-87</guid>
		<description>problems with stored procudure is that
it is DB specific. what happen if one day
you would like to change database, does the
code in store procedure will still work?</description>
		<content:encoded><![CDATA[<p>problems with stored procudure is that<br />
it is DB specific. what happen if one day<br />
you would like to change database, does the<br />
code in store procedure will still work?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-86</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 02 Apr 2009 11:56:08 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-86</guid>
		<description>@Derick Ng - Cheers. It&#039;s an honour to be on such a feed.

@Adam - If by calling &lt;em&gt;&#039;them directly on the Model&#039;&lt;/em&gt; you mean calling them from the Controller, then yes, you are correct. You can do that. It looks like that is the case on book.cakephp.org : &lt;a href=&quot;http://book.cakephp.org/view/456/query&quot; rel=&quot;nofollow&quot;&gt;Query&lt;/a&gt;

It would look like this:
&lt;code&gt;$advert= $this-&gt;Advert-&gt;query(&#039;CALL display_ad(&quot;&#039;.$site.&#039;&quot;);&#039;);&lt;/code&gt;

But I do subscribe to the fat model skinny controller thing - as pointed out by &lt;a href=&quot;http://cakebaker.42dh.com/2007/02/26/should-you-use-modelquery-in-the-controller/&quot; rel=&quot;nofollow&quot;&gt;cakebaker&lt;/a&gt;. That being said I also like to keep the database transactions in the Model, and leave to Controller to do what it does.</description>
		<content:encoded><![CDATA[<p>@Derick Ng &#8211; Cheers. It&#8217;s an honour to be on such a feed.</p>
<p>@Adam &#8211; If by calling <em>&#8216;them directly on the Model&#8217;</em> you mean calling them from the Controller, then yes, you are correct. You can do that. It looks like that is the case on book.cakephp.org : <a href="http://book.cakephp.org/view/456/query" rel="nofollow">Query</a></p>
<p>It would look like this:<br />
<code>$advert= $this-&gt;Advert-&gt;query('CALL display_ad("'.$site.'");');</code></p>
<p>But I do subscribe to the fat model skinny controller thing &#8211; as pointed out by <a href="http://cakebaker.42dh.com/2007/02/26/should-you-use-modelquery-in-the-controller/" rel="nofollow">cakebaker</a>. That being said I also like to keep the database transactions in the Model, and leave to Controller to do what it does.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-85</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Thu, 02 Apr 2009 11:11:05 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-85</guid>
		<description>Although I personally don&#039;t use stored procedures, I was under the impression you could call them directly on the model, and cake would execute them automatically.

So instead of this:

$this-&gt;Advert-&gt;findAd($site);

you would do:

$this-&gt;Advert-&gt;display_ad($site);</description>
		<content:encoded><![CDATA[<p>Although I personally don&#8217;t use stored procedures, I was under the impression you could call them directly on the model, and cake would execute them automatically.</p>
<p>So instead of this:</p>
<p>$this-&gt;Advert-&gt;findAd($site);</p>
<p>you would do:</p>
<p>$this-&gt;Advert-&gt;display_ad($site);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick Ng</title>
		<link>http://frodosghost.com/2009/04/02/using-mysql-stored-procedures-in-cakephp/comment-page-1/#comment-84</link>
		<dc:creator>Derick Ng</dc:creator>
		<pubDate>Thu, 02 Apr 2009 09:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://frodosghost.com/?p=215#comment-84</guid>
		<description>Hey, I have added your site to http://planetcakephp.org/aggregator/sources/1244-james-rickard if you don&#039;t mind.

Cheers and keep baking!</description>
		<content:encoded><![CDATA[<p>Hey, I have added your site to <a href="http://planetcakephp.org/aggregator/sources/1244-james-rickard" rel="nofollow">http://planetcakephp.org/aggregator/sources/1244-james-rickard</a> if you don&#8217;t mind.</p>
<p>Cheers and keep baking!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
