<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Switch your database configuration based on some criteria</title>
	<atom:link href="http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Wed, 08 May 2013 13:40:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-354</link>
		<dc:creator><![CDATA[cakebaker]]></dc:creator>
		<pubDate>Sat, 06 May 2006 07:51:57 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-354</guid>
		<description><![CDATA[@tiago: I am not quite sure what you try to accomplish. If model A should be stored in database 1 and model B should be stored in database 2, then you can set the variable $useDbConfig in your models:

var $useDbConfig = &#039;yourDBConfiguration&#039;;
]]></description>
		<content:encoded><![CDATA[<p>@tiago: I am not quite sure what you try to accomplish. If model A should be stored in database 1 and model B should be stored in database 2, then you can set the variable $useDbConfig in your models:</p>
<p>var $useDbConfig = &#8216;yourDBConfiguration&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiago</title>
		<link>http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-353</link>
		<dc:creator><![CDATA[tiago]]></dc:creator>
		<pubDate>Sat, 06 May 2006 06:21:27 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-353</guid>
		<description><![CDATA[Very, very nice, i have 2 databases, one for users and other for content. :-) But, how can i change &quot;on the fly&quot;?]]></description>
		<content:encoded><![CDATA[<p>Very, very nice, i have 2 databases, one for users and other for content. :-) But, how can i change &#8220;on the fly&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ricardo Stuven</title>
		<link>http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-143</link>
		<dc:creator><![CDATA[Ricardo Stuven]]></dc:creator>
		<pubDate>Sun, 26 Feb 2006 00:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.wordpress.com/2006/02/24/switch-your-database-configuration-based-on-some-criteria/#comment-143</guid>
		<description><![CDATA[I use a similar approach, but in AppModel. Using your condition, it would look like this:

&lt;code&gt;
	function __construct($id=false, $table=null, $ds=null)
	{
		if (strstr($_SERVER[&#039;REQUEST_URI&#039;], &#039;/tests&#039;))
		{
			$this-&gt;useDbConfig = &#039;test&#039;;
		}
		parent::__construct($id, $table, $ds);
	}
&lt;/code&gt;]]></description>
		<content:encoded><![CDATA[<p>I use a similar approach, but in AppModel. Using your condition, it would look like this:</p>
<p><code><br />
	function __construct($id=false, $table=null, $ds=null)<br />
	{<br />
		if (strstr($_SERVER['REQUEST_URI'], '/tests'))<br />
		{<br />
			$this-&gt;useDbConfig = 'test';<br />
		}<br />
		parent::__construct($id, $table, $ds);<br />
	}<br />
</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>
