<?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: CodeIgniter with Multiple Database Support</title>
	<atom:link href="http://www.gotphp.com/codeigniter-multiple-database-support/5468/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/</link>
	<description>Practical Coding Examples and Advice For PHP Developers</description>
	<lastBuildDate>Wed, 18 Apr 2012 12:20:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: mboo2005</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3599</link>
		<dc:creator>mboo2005</dc:creator>
		<pubDate>Thu, 23 Feb 2012 09:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3599</guid>
		<description>It&#039;s Ok for me.  Thanks!!</description>
		<content:encoded><![CDATA[<p>It&#8217;s Ok for me.  Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Davis</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3595</link>
		<dc:creator>Matthew Davis</dc:creator>
		<pubDate>Tue, 10 Jan 2012 20:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3595</guid>
		<description>An alternate approach that worked for me (not sure if it will work for all configurations) - extend profiler class and override _compile_queries method (modify first foreach loop with code below). 

// Let&#039;s determine which databases are currently connected to		foreach (get_object_vars($this-&gt;CI) as $CI_object)		{				if (is_object($CI_object) &amp;&amp; is_subclass_of(get_class($CI_object), &#039;CI_DB&#039;) )			{				$dbs[] = $CI_object;			}            if (is_object($CI_object) &amp;&amp; is_subclass_of(get_class($CI_object), $this-&gt;CI-&gt;config-&gt;config[&#039;subclass_prefix&#039;] . &#039;Model&#039;) ) {                foreach (get_object_vars($CI_object) as $CI_sub_object)                {                    if (is_object($CI_sub_object) &amp;&amp; is_subclass_of(get_class($CI_sub_object), &#039;CI_DB&#039;) )                    {                        $dbs[] = $CI_sub_object;                    }                }            }		}</description>
		<content:encoded><![CDATA[<p>An alternate approach that worked for me (not sure if it will work for all configurations) &#8211; extend profiler class and override _compile_queries method (modify first foreach loop with code below). </p>
<p>// Let&#8217;s determine which databases are currently connected to		foreach (get_object_vars($this-&gt;CI) as $CI_object)		{				if (is_object($CI_object) &amp;&amp; is_subclass_of(get_class($CI_object), &#8216;CI_DB&#8217;) )			{				$dbs[] = $CI_object;			}            if (is_object($CI_object) &amp;&amp; is_subclass_of(get_class($CI_object), $this-&gt;CI-&gt;config-&gt;config['subclass_prefix'] . &#8216;Model&#8217;) ) {                foreach (get_object_vars($CI_object) as $CI_sub_object)                {                    if (is_object($CI_sub_object) &amp;&amp; is_subclass_of(get_class($CI_sub_object), &#8216;CI_DB&#8217;) )                    {                        $dbs[] = $CI_sub_object;                    }                }            }		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: VCL</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3581</link>
		<dc:creator>VCL</dc:creator>
		<pubDate>Fri, 02 Sep 2011 13:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3581</guid>
		<description>Hello there, is there anyway to fill in the alternate username and password from 2 POST variables? I have to do so and I&#039;m having tones of errors. thanks </description>
		<content:encoded><![CDATA[<p>Hello there, is there anyway to fill in the alternate username and password from 2 POST variables? I have to do so and I&#8217;m having tones of errors. thanks </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah Spirakus</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3575</link>
		<dc:creator>Noah Spirakus</dc:creator>
		<pubDate>Wed, 01 Jun 2011 18:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3575</guid>
		<description>Have you played with this functionality in codeigniter v2+? It doesnt seem to work the same way and seems to hang on to las db used, even if you assign them as different variables.</description>
		<content:encoded><![CDATA[<p>Have you played with this functionality in codeigniter v2+? It doesnt seem to work the same way and seems to hang on to las db used, even if you assign them as different variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah Spirakus</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3576</link>
		<dc:creator>Noah Spirakus</dc:creator>
		<pubDate>Wed, 01 Jun 2011 18:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3576</guid>
		<description>Have you played with this functionality in codeigniter v2+? It doesnt seem to work the same way and seems to hang on to las db used, even if you assign them as different variables.</description>
		<content:encoded><![CDATA[<p>Have you played with this functionality in codeigniter v2+? It doesnt seem to work the same way and seems to hang on to las db used, even if you assign them as different variables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leth</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3572</link>
		<dc:creator>leth</dc:creator>
		<pubDate>Tue, 10 May 2011 01:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3572</guid>
		<description> I encountered another problem. It says &quot;
Table &#039;ticketingsystem.employee&#039; doesn&#039;t exist&quot;. tTicketingsystem is my default database while the employee table is in my second database, which is employee_db. I accessed the employee table in my alternate model using the second database. The accessing was all messed up. :(</description>
		<content:encoded><![CDATA[<p> I encountered another problem. It says &#8221;<br />
Table &#8216;ticketingsystem.employee&#8217; doesn&#8217;t exist&#8221;. tTicketingsystem is my default database while the employee table is in my second database, which is employee_db. I accessed the employee table in my alternate model using the second database. The accessing was all messed up. <img src='http://www.gotphp.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: leth</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3571</link>
		<dc:creator>leth</dc:creator>
		<pubDate>Tue, 10 May 2011 01:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3571</guid>
		<description>I forgot I tinkered with the database.php and commented the second database group. Haha. I fixed it already. How should I use the function for getting data (in the alternate_model) in a controller? Would I just directly use $this-&gt;Alternate_Model-&gt;myFunction()?</description>
		<content:encoded><![CDATA[<p>I forgot I tinkered with the database.php and commented the second database group. Haha. I fixed it already. How should I use the function for getting data (in the alternate_model) in a controller? Would I just directly use $this-&gt;Alternate_Model-&gt;myFunction()?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.gotphp.com/codeigniter-multiple-database-support/5468/comment-page-1/#comment-3570</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 09 May 2011 12:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gotphp.com/?p=68#comment-3570</guid>
		<description>Hi! Did you setup two databases and update the database.php file with the new credentials?</description>
		<content:encoded><![CDATA[<p>Hi! Did you setup two databases and update the database.php file with the new credentials?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

