title: How we insert 'lft' and 'rgt' values for nested-set model for a data that we are receiving from other source?
body: <p>I have to manage some hierarchical data for my web application. The data consist of messages of four types. I decided to use nested-list model because there can be arbitrary number of child nodes in the data. The data that I need to store is coming from an external source, how do I add values to the 'lft' &amp; 'rgt' fields for it to be inserted into mySQL.<br>
  <strong>EDITED</strong>
  This is how I display messages(timeline) that my application fetches from Twitter using curl. </p>
  
  <pre><code>foreach ($xml-&gt;entry as $status) {
         echo'&lt;li&gt;'.$status-&gt;content.'&lt;/li&gt;';
     }
  </code></pre>
  
  <p>Now in spite of direct printing, I need to store the contents of '$status->content' into database so that I can manipulate those i.e print in a parent-child hierachy.  </p>