title: Adjacency List Model Select by Path
body: <p>I'm trying to select a node in my heirarchical system.</p>
  
  <p>I have the "/Path/To/Some/Node" (In exactly that form) and I am trying to figure out how I can  get the children of "Node". Naturally "Node" is pseudo-unique, in that it is the only child called "Node" inside of Some, but there could be another "Node" inside of "Path" so you obviously can't just explode and then do a simple Node. </p>
  
  <p>So I need to create a select query which looks down each level... </p>
  
  <p>I could obviously do this by using tonnes of querys, ie.</p>
  
  <pre><code>Select id from Table where name = "Path"
  Select id from Table where name = "To" and parent = "$id"
  Select id from Table where name = "Some" and parent = "$id"
  Select id from Table where name = "Node" and parent = "$id"
  </code></pre>
  
  <p>This isn't ideal...
  Can anyone advise?</p>