title: how to do a self-join
body: <p>I have the following table with 3 columns, this is just a sample (not a real one)</p>
  
  <pre><code>Number Decription Value
  1 Green 100
  1 Yellow 101
  1 Blue 102
  2 Chair 200
  2 Table 101
  2 Green 150
  3 Car 200
  3 plane 205
  3 green 105
  </code></pre>
  
  <p>My first query is to find any record or row which contain value "101" No problemo in this scenario I find 2 records [1, Yellow,101] and [2, table, 101] and all the records with number 3 and the rest are ignored just perfect. Now I need to select other records based on the RESULT of the FIRST query, the number 1 and 2 are the true results. So from column [number] in this case I found [1 and 2], I want to search and add the value of any description = [green]. Still ignoring [3] which has NO [101] value.</p>
  
  <p>The ideal result I want to display is</p>
  
  <pre><code>[1, yellow, 101] and Green is 100
  [2, table, 101] and Green is 150
  </code></pre>
  
  <p>I have got a headache to get it work so far NO good result. If anyone has a any idea how to make the script for this case please let me know. I hope the questions is clear.</p>
  
  <p>P.S the content of the table is fake just to get an impression what is about and fyi it's SQL + PHP.</p>