<?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 and Doctrine from scratch. Day 8 – Hooks, Profiling &amp; DQL</title>
	<atom:link href="http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/feed" rel="self" type="application/rss+xml" />
	<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql</link>
	<description>PHP, JS, CSS, jQuery, CodeIgniter, Doctrine</description>
	<lastBuildDate>Sat, 04 Sep 2010 17:13:31 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vladimir</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-5525</link>
		<dc:creator>Vladimir</dc:creator>
		<pubDate>Fri, 21 May 2010 10:17:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-5525</guid>
		<description>Hi,
I have a strange problem.
If I output the output variable from profiler hook, it looks like this:

------------------------------------------------------
Array
(
    [0] =&gt; Array
        (
            [type] =&gt; query
            [query] =&gt; SELECT ..(something).......
            [time] =&gt; 0.000397
        )
    [1] =&gt; Array
        (
            [type] =&gt; query
            [query] =&gt; SELECT ..(something).......
            [time] =&gt; 0.000994
        )
    [2] =&gt; Array
        (
            [type] =&gt; query
            [query] =&gt; SELECT ..(something).......
            [time] =&gt; 0.000710
        )
)
Total Doctrine time: 0.0027720928192139
Peak Memory: 9326416 
------------------------------------------------------

But in my doctrine_profiler file I got this:

---------------------------------------------
php if.....

Array
(
)

Total Doctrine time: 0
Peak Memory: 9326416
---------------------------------------

Empty array? Why?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have a strange problem.<br />
If I output the output variable from profiler hook, it looks like this:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Array<br />
(<br />
    [0] =&gt; Array<br />
        (<br />
            [type] =&gt; query<br />
            [query] =&gt; SELECT ..(something)&#8230;&#8230;.<br />
            [time] =&gt; 0.000397<br />
        )<br />
    [1] =&gt; Array<br />
        (<br />
            [type] =&gt; query<br />
            [query] =&gt; SELECT ..(something)&#8230;&#8230;.<br />
            [time] =&gt; 0.000994<br />
        )<br />
    [2] =&gt; Array<br />
        (<br />
            [type] =&gt; query<br />
            [query] =&gt; SELECT ..(something)&#8230;&#8230;.<br />
            [time] =&gt; 0.000710<br />
        )<br />
)<br />
Total Doctrine time: 0.0027720928192139<br />
Peak Memory: 9326416<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>But in my doctrine_profiler file I got this:</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
php if&#8230;..</p>
<p>Array<br />
(<br />
)</p>
<p>Total Doctrine time: 0<br />
Peak Memory: 9326416<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>Empty array? Why?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Burak</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-5092</link>
		<dc:creator>Burak</dc:creator>
		<pubDate>Sun, 09 May 2010 00:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-5092</guid>
		<description>from(&#039;Category c, c.Forums f&#039;)

that makes c and f aliases for the tables</description>
		<content:encoded><![CDATA[<p>from(&#8217;Category c, c.Forums f&#8217;)</p>
<p>that makes c and f aliases for the tables</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-5091</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Sat, 08 May 2010 23:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-5091</guid>
		<description>Thanks for more tutorial-ly goodness.  I had a question: what are the single letters in the Doctrine_Query? Like this:
&quot;-&gt;select(&#039;c.title, f.title, f.description&#039;)&quot;
Where do the letters c and f come from; what do they represent.  Does this have something to do with MYSQL programming?</description>
		<content:encoded><![CDATA[<p>Thanks for more tutorial-ly goodness.  I had a question: what are the single letters in the Doctrine_Query? Like this:<br />
&#8220;-&gt;select(&#8217;c.title, f.title, f.description&#8217;)&#8221;<br />
Where do the letters c and f come from; what do they represent.  Does this have something to do with MYSQL programming?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-4319</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 24 Apr 2010 04:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-4319</guid>
		<description>I had problems when PHP tried to write the &#039;doctrine_profiler.php&#039; to my /system/logs directory.  It turned out that I needed to set permissions on the /system/logs directory to 777.  After that it all worked fine.</description>
		<content:encoded><![CDATA[<p>I had problems when PHP tried to write the &#8216;doctrine_profiler.php&#8217; to my /system/logs directory.  It turned out that I needed to set permissions on the /system/logs directory to 777.  After that it all worked fine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elbi</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-3170</link>
		<dc:creator>Elbi</dc:creator>
		<pubDate>Sun, 28 Mar 2010 03:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-3170</guid>
		<description>I guess it&#039;s due to the nature of Doctrine_Collection Object. But I still don&#039;t understand how exatly or why are the values of num_threads for the categories are 2 and 0.</description>
		<content:encoded><![CDATA[<p>I guess it&#8217;s due to the nature of Doctrine_Collection Object. But I still don&#8217;t understand how exatly or why are the values of num_threads for the categories are 2 and 0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elbi</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-3169</link>
		<dc:creator>Elbi</dc:creator>
		<pubDate>Sun, 28 Mar 2010 02:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-3169</guid>
		<description>Q:
When we print_r the categories after we use DQL for the query, eg:
print_r($vars[&#039;categories&#039;]-&gt;toArray(true));

Why is there another

            [num_threads] =&gt; 0
        )

)

at the end?</description>
		<content:encoded><![CDATA[<p>Q:<br />
When we print_r the categories after we use DQL for the query, eg:<br />
print_r($vars['categories']-&gt;toArray(true));</p>
<p>Why is there another</p>
<p>            [num_threads] =&gt; 0<br />
        )</p>
<p>)</p>
<p>at the end?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haqqi</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-3051</link>
		<dc:creator>Haqqi</dc:creator>
		<pubDate>Thu, 25 Mar 2010 05:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-3051</guid>
		<description>I have an idea.

How about integrating doctrine profiling with CI profiling. So that we can just call the CI&#039;s profiler with parameter true. How about this?</description>
		<content:encoded><![CDATA[<p>I have an idea.</p>
<p>How about integrating doctrine profiling with CI profiling. So that we can just call the CI&#8217;s profiler with parameter true. How about this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Antonini</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-3009</link>
		<dc:creator>Daniel Antonini</dc:creator>
		<pubDate>Tue, 23 Mar 2010 20:24:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-3009</guid>
		<description>My english is very bad, i have problem, i working in symfony framework and need at model use tow tables. 

as i do..?</description>
		<content:encoded><![CDATA[<p>My english is very bad, i have problem, i working in symfony framework and need at model use tow tables. </p>
<p>as i do..?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeIgniter- Doctrine ORM Tutorial: A way of enhancing CI &#124; TheUnical Technologies Blog</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-2412</link>
		<dc:creator>CodeIgniter- Doctrine ORM Tutorial: A way of enhancing CI &#124; TheUnical Technologies Blog</dc:creator>
		<pubDate>Sat, 06 Mar 2010 08:19:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-2412</guid>
		<description>[...] Day 8: Hooks, Profiling &amp; DQL [...]</description>
		<content:encoded><![CDATA[<p>[...] Day 8: Hooks, Profiling &amp; DQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-2307</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sun, 28 Feb 2010 05:19:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-2307</guid>
		<description>I had an odd problem...

[Sat Feb 27 21:02:16 2010] [error] [client 10.5.5.197] PHP Fatal error:  Call to undefined function memory_get_peak_usage() in /home/web/sites/citest.com/html/system/application/hooks/doctrine_profiler_hooks.php on line 38

...then I realized - I&#039;m dealing with RHEL... sure enough, the base php version = 5.1.6.  Yea, remember to update php to 5.2 or better.

Just a reminder.</description>
		<content:encoded><![CDATA[<p>I had an odd problem&#8230;</p>
<p>[Sat Feb 27 21:02:16 2010] [error] [client 10.5.5.197] PHP Fatal error:  Call to undefined function memory_get_peak_usage() in /home/web/sites/citest.com/html/system/application/hooks/doctrine_profiler_hooks.php on line 38</p>
<p>&#8230;then I realized &#8211; I&#8217;m dealing with RHEL&#8230; sure enough, the base php version = 5.1.6.  Yea, remember to update php to 5.2 or better.</p>
<p>Just a reminder.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeIgniter and Doctrine from scratch. Day 11 – Record Hooks &#124; PHP and Stuff</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-1960</link>
		<dc:creator>CodeIgniter and Doctrine from scratch. Day 11 – Record Hooks &#124; PHP and Stuff</dc:creator>
		<pubDate>Mon, 08 Feb 2010 21:24:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-1960</guid>
		<description>[...] Day 8: Hooks, Profiling &amp; DQL [...]</description>
		<content:encoded><![CDATA[<p>[...] Day 8: Hooks, Profiling &amp; DQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CodeIgniter and Doctrine from Scratch &#124; CodeIgniter-jQuery</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-1327</link>
		<dc:creator>CodeIgniter and Doctrine from Scratch &#124; CodeIgniter-jQuery</dc:creator>
		<pubDate>Mon, 18 Jan 2010 21:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-1327</guid>
		<description>[...] Day 8: Hooks, Profiling &amp; DQL [...]</description>
		<content:encoded><![CDATA[<p>[...] Day 8: Hooks, Profiling &amp; DQL [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Burak</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-953</link>
		<dc:creator>Burak</dc:creator>
		<pubDate>Tue, 22 Dec 2009 18:37:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-953</guid>
		<description>Well, DQL itself has nice features. I prefer it over Active Records. 
But also we utilized other features of Doctrine too, not just DQL.</description>
		<content:encoded><![CDATA[<p>Well, DQL itself has nice features. I prefer it over Active Records.<br />
But also we utilized other features of Doctrine too, not just DQL.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ansh</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-952</link>
		<dc:creator>Ansh</dc:creator>
		<pubDate>Tue, 22 Dec 2009 17:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-952</guid>
		<description>Solved
-&gt;where(’m.account_id=?&#039;,$variable)</description>
		<content:encoded><![CDATA[<p>Solved<br />
-&gt;where(’m.account_id=?&#8217;,$variable)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ansh</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-951</link>
		<dc:creator>Ansh</dc:creator>
		<pubDate>Tue, 22 Dec 2009 16:02:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-951</guid>
		<description>i got  a question in DQL how to pass session User id

	$vars[&#039;mood&#039;] = Doctrine_Query::create()
	-&gt;select(&#039;m.mood_name, a.id, m.account_id&#039;)
	-&gt;from(&#039;mood m, m.account a&#039;)
	-&gt;where(&#039;m.account_id=&quot;7&quot;&#039;)

 i want to show data according to current logged user.

m.account_id=Current_User::user()-&gt;id; 

this is not working</description>
		<content:encoded><![CDATA[<p>i got  a question in DQL how to pass session User id</p>
<p>	$vars['mood'] = Doctrine_Query::create()<br />
	-&gt;select(&#8217;m.mood_name, a.id, m.account_id&#8217;)<br />
	-&gt;from(&#8217;mood m, m.account a&#8217;)<br />
	-&gt;where(&#8217;m.account_id=&#8221;7&#8243;&#8216;)</p>
<p> i want to show data according to current logged user.</p>
<p>m.account_id=Current_User::user()-&gt;id; </p>
<p>this is not working</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: auke</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-946</link>
		<dc:creator>auke</dc:creator>
		<pubDate>Tue, 22 Dec 2009 10:10:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-946</guid>
		<description>it is always a goog thing to use DQL.
and with using DQL... what is the advantage in using Doctrine?</description>
		<content:encoded><![CDATA[<p>it is always a goog thing to use DQL.<br />
and with using DQL&#8230; what is the advantage in using Doctrine?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denes</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-846</link>
		<dc:creator>Denes</dc:creator>
		<pubDate>Fri, 18 Dec 2009 13:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-846</guid>
		<description>Ok! That&#039;s it! Actually I&#039;m using the Doctrine 1.2 version.
Thanks a lot!</description>
		<content:encoded><![CDATA[<p>Ok! That&#8217;s it! Actually I&#8217;m using the Doctrine 1.2 version.<br />
Thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Burak</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-843</link>
		<dc:creator>Burak</dc:creator>
		<pubDate>Fri, 18 Dec 2009 00:36:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-843</guid>
		<description>Ok, I finally figured it out. It has to do with the Doctrine version.

When I first started writing this series, Doctrine 1.1 was the stable release. Now Doctrine 1.2 is out, so I assume that is what you installed. I just upgraded my install from 1.1 to 1.2 and got that same error as you guys. I am really not sure what kind of internal change they made that caused this, because 1.2 was supposed to be backwards compatible with 1.1.

Anyway, I fixed the problem. In controllers/home.php, you need to change this line:

			-&gt;addSelect(&#039;COUNT(t.id) as num_threads&#039;)

to this:

			-&gt;addSelect(&#039;t.id, COUNT(t.id) as num_threads&#039;)

That should fix it.

Now I will go ahead update the articles.</description>
		<content:encoded><![CDATA[<p>Ok, I finally figured it out. It has to do with the Doctrine version.</p>
<p>When I first started writing this series, Doctrine 1.1 was the stable release. Now Doctrine 1.2 is out, so I assume that is what you installed. I just upgraded my install from 1.1 to 1.2 and got that same error as you guys. I am really not sure what kind of internal change they made that caused this, because 1.2 was supposed to be backwards compatible with 1.1.</p>
<p>Anyway, I fixed the problem. In controllers/home.php, you need to change this line:</p>
<p>			->addSelect(&#39;COUNT(t.id) as num_threads&#39;)</p>
<p>to this:</p>
<p>			->addSelect(&#39;t.id, COUNT(t.id) as num_threads&#39;)</p>
<p>That should fix it.</p>
<p>Now I will go ahead update the articles.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Denes</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-842</link>
		<dc:creator>Denes</dc:creator>
		<pubDate>Thu, 17 Dec 2009 23:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-842</guid>
		<description>I had the same error message reported by Lenzjo, but unfortunately I could not figure out what triggers it. Some help?
Thanks</description>
		<content:encoded><![CDATA[<p>I had the same error message reported by Lenzjo, but unfortunately I could not figure out what triggers it. Some help?<br />
Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lenzjo</title>
		<link>http://www.phpandstuff.com/articles/codeigniter-doctrine-scratch-day-8-hooks-profiling-dql/comment-page-1#comment-711</link>
		<dc:creator>lenzjo</dc:creator>
		<pubDate>Mon, 14 Dec 2009 23:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.phpandstuff.com/?p=649#comment-711</guid>
		<description>It&#039;s taken me a while, but I finally got it fixed. Back in day 1, there was a problem with putting doctrine in the app plugin folder, so I put it in the sys plugin folder.

After going thru every file, in the download, and comparing mine to them the only diff was doctrine&#039;s location. Having nothing to lose I moved it and it&#039;s all working fine now.

I only started using CI just over a week ago, so I&#039;m not totally familar yet with CI, but I have been using the Template library from the start with this project and was getting to think that it might be the problem.</description>
		<content:encoded><![CDATA[<p>It&#8217;s taken me a while, but I finally got it fixed. Back in day 1, there was a problem with putting doctrine in the app plugin folder, so I put it in the sys plugin folder.</p>
<p>After going thru every file, in the download, and comparing mine to them the only diff was doctrine&#8217;s location. Having nothing to lose I moved it and it&#8217;s all working fine now.</p>
<p>I only started using CI just over a week ago, so I&#8217;m not totally familar yet with CI, but I have been using the Template library from the start with this project and was getting to think that it might be the problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
