title: In MYSQL - Select up to a certain value in a column
body: <p>I searched for a solution since a few weeks, but however could not really solve problem: Is it possible to select only a few rows until or up to a certain value, which could repeating itself further down my table?
  I think, an example can be very useful:</p>
  
  <pre><code>Type |  OBID    | RECID
  5    | T-000032 | 5637637  
  1    | T-123456 | 5637636 
  1    | T-789123 | 5637635  
  2    | T-123456 | 5637634
  2    | T-789123 | 5637633 
  1    | T-221133 | 5637628 
  2    | T-221133 | 5637612
  </code></pre>
  
  <p>Here a little example:
  This section of my table will always start with Type 5 followed by a couple of rows with Type 1. I only need this special "group" of rows with Type 1 since the first row with type 2 appears.
  I would not be attracted to any other row with Type 1 - only this ones:</p>
  
  <pre><code>1  | T-123456 | 5637636 
  1  | T-789123 | 5637635 
  </code></pre>
  
  <p>Quasi only this rows with Type 1 which are between
  the first row with Type 5 and 
  the first row with Type 2.</p>
  
  <p>I hope, you could help me. 
  Thank you very very much.</p>
  
  <p>Chrissy</p>