title: How to use result of one query in another query
body: <p>I have one query like   </p>
  
  <pre><code>SELECT lft,rgt
  FROM  `navigation` 
  WHERE  `slug` =  'case-studies';
  </code></pre>
  
  <p>output of this query<br>
  lft rgt<br>
  28  89</p>
  
  <p>Now i want to use this result in another query in same table</p>
  
  <pre><code>SELECT * FROM `navigation` WHERE `lft` between 28 and 89
  </code></pre>
  
  <p>But i want to do this dynamically So that i don't need to pass "left", "right"<br>
  value again and again<br>
  Now i want to know, how can i do something like below.</p>
  
  <pre><code>SELECT * FROM `navigation` WHERE `lft` between :lft and :rgt
  </code></pre>