<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Webtop-Designs Forums Manager</title>
		<link>http://www.webtop-designs.com/site.php/msgb/main/</link>
		<description><![CDATA[Webtop-Designs Forums Manager - Our most recent posts.]]></description>
		<language>en-us</language>
		<pubDate>Thu, 23 Feb 2012 07:18:15 +0000</pubDate>
		<lastBuildDate>Thu, 23 Feb 2012 07:18:15 +0000</lastBuildDate>
		<generator>VTribes</generator>
		<item>
			<title>SQL output from a shell</title>
			<link>http://www.webtop-designs.com/site.php/msgb/view_topic/sql_output_from_a_shell/page_1/</link>
			<guid>http://www.webtop-designs.com/site.php/msgb/view_topic/sql_output_from_a_shell/page_1/</guid>
			<description><![CDATA[If you are using shells and want to output SQL for debugging, simply do this:

In your shell or other accessible file, create this function:


public&amp;nbsp;function&amp;nbsp;sqlDump($dbConfig&amp;nbsp;=&amp;nbsp;&amp;amp;#039;default&amp;amp;#039;,&amp;nbsp;$exit&amp;nbsp;=&amp;nbsp;true)&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ConnectionManager::getDataSource($dbConfig)-&amp;amp;gt;showLog();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if($exit){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;exit;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}}


Next, in your shell create a destructor, like so:

public&amp;nbsp;function&amp;nbsp;__destruct()&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;amp;gt;hr();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;$this-&amp;amp;gt;sqlDump();}


Now, after your shell ends, you&amp;#039;ll see the SQL log of all model calls.]]></description>
			<pubDate>Sun, 25 Dec 2011 23:21:54 +0000</pubDate>
		</item>
	</channel>
</rss>
