<?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: Tree structure with data from database : &#8220;php Programming &#8221; is backend</title>
	<atom:link href="http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/feed/" rel="self" type="application/rss+xml" />
	<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/</link>
	<description></description>
	<lastBuildDate>Wed, 06 Jan 2010 13:32:32 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Efrain Atienza</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-706</link>
		<dc:creator>Efrain Atienza</dc:creator>
		<pubDate>Thu, 17 Sep 2009 07:44:23 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-706</guid>
		<description>id} is dollar id :P</description>
		<content:encoded><![CDATA[<p>id} is dollar id <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Efrain Atienza</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-705</link>
		<dc:creator>Efrain Atienza</dc:creator>
		<pubDate>Thu, 17 Sep 2009 07:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-705</guid>
		<description>For example using doctrine and a n-ary tree database structure:

private function category($id) {
	$category = Doctrine_Query::create()
				-&gt;where(&#039;id = ?&#039;, array($id))
				-&gt;from(&#039;categories&#039;)
				-&gt;fetchOne();
	$subcategories = Doctrine_Query::create()
				-&gt;where(&#039;idParent = ?&#039;, array($id))
				-&gt;from(&#039;categories&#039;)
				-&gt;orderby(&#039;order ASC&#039;)
				-&gt;execute();
	if (count($subcategories)) {
		echo &quot;id}&#039; title=&#039;{$category-&gt;title}&#039;&gt;&quot;;
		foreach ($subcategories as $subcategory) {
				$this-&gt;category($subcategory-&gt;id);
		}
		echo &quot;&quot;;
	} else {
		echo &quot;id}&#039; title=&#039;{$category-&gt;title}&#039; /&gt;&quot;;
	}
}</description>
		<content:encoded><![CDATA[<p>For example using doctrine and a n-ary tree database structure:</p>
<p>private function category($id) {<br />
	$category = Doctrine_Query::create()<br />
				-&gt;where(&#8216;id = ?&#8217;, array($id))<br />
				-&gt;from(&#8216;categories&#8217;)<br />
				-&gt;fetchOne();<br />
	$subcategories = Doctrine_Query::create()<br />
				-&gt;where(&#8216;idParent = ?&#8217;, array($id))<br />
				-&gt;from(&#8216;categories&#8217;)<br />
				-&gt;orderby(&#8216;order ASC&#8217;)<br />
				-&gt;execute();<br />
	if (count($subcategories)) {<br />
		echo &#8220;id}&#8217; title=&#8217;{$category-&gt;title}&#8217;&gt;&#8221;;<br />
		foreach ($subcategories as $subcategory) {<br />
				$this-&gt;category($subcategory-&gt;id);<br />
		}<br />
		echo &#8220;&#8221;;<br />
	} else {<br />
		echo &#8220;id}&#8217; title=&#8217;{$category-&gt;title}&#8217; /&gt;&#8221;;<br />
	}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pradip Jadhav</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-629</link>
		<dc:creator>Pradip Jadhav</dc:creator>
		<pubDate>Wed, 10 Jun 2009 07:28:30 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-629</guid>
		<description>Hi Kumar,

I have some problem. I created a tree structure as u told.

Now problem is that i want to expand first node of a tree. 

Please help me to solve this.

Thanks in advance

Regards,
Pradip Jadhav</description>
		<content:encoded><![CDATA[<p>Hi Kumar,</p>
<p>I have some problem. I created a tree structure as u told.</p>
<p>Now problem is that i want to expand first node of a tree. </p>
<p>Please help me to solve this.</p>
<p>Thanks in advance</p>
<p>Regards,<br />
Pradip Jadhav</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MS</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-459</link>
		<dc:creator>MS</dc:creator>
		<pubDate>Fri, 13 Feb 2009 00:46:12 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-459</guid>
		<description>Thankyou very much for the solution... i wasted lot of time on this...</description>
		<content:encoded><![CDATA[<p>Thankyou very much for the solution&#8230; i wasted lot of time on this&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kumargandhi</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-451</link>
		<dc:creator>kumargandhi</dc:creator>
		<pubDate>Fri, 06 Feb 2009 04:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-451</guid>
		<description>I will mail you some code examples, hope it will help you.

regards,
kumar.</description>
		<content:encoded><![CDATA[<p>I will mail you some code examples, hope it will help you.</p>
<p>regards,<br />
kumar.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry Johnson</title>
		<link>http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-447</link>
		<dc:creator>Larry Johnson</dc:creator>
		<pubDate>Fri, 06 Feb 2009 02:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://flexonblog.wordpress.com/2007/11/22/tree-structure-with-data-from-database-php-programming-is-backend/#comment-447</guid>
		<description>Could you post the PHP code to produce the xml?  I am having a terrible time getting the data into the nested xml format.  I have the data flat in a table with the columns:
ID
Type (parent or child)
Parent ID
Label</description>
		<content:encoded><![CDATA[<p>Could you post the PHP code to produce the xml?  I am having a terrible time getting the data into the nested xml format.  I have the data flat in a table with the columns:<br />
ID<br />
Type (parent or child)<br />
Parent ID<br />
Label</p>
]]></content:encoded>
	</item>
</channel>
</rss>
