title: MySQL - select one row - then one next and one previous relative to the selected
body: <p>I'll try to make this clear.</p>
  
  <p>I need to select a specific row and one row previous relative from that selected row and one row next relative from that selected row without using id's. Is this possible? Previous and next one, in short.</p>
  
  <p>The reason why I can't (maybe I just don't know how) use id's, is because they are not in sequential order. They have gaps as you can see from this rather immature and random example.</p>
  
  <pre><code>TABLE &lt;-the name of the table
  +----+----------------------+-------+
  | id | name                 | value |
  +----+----------------------+-------+
  |  1 | some_name            | asf   |
  +----+----------------------+-------+
  |  4 | hello                | A3r   |
  +----+----------------------+-------+
  |  5 | how_do_you_do        | HR5   |
  +----+----------------------+-------+
  |  8 | not_bad              | 00D   |
  +----+----------------------+-------+
  | 12 | i_like_women         | lla   |
  +----+----------------------+-------+
  | 13 | are_you_serious      | 1Ha   |
  +----+----------------------+-------+
  | 15 | nah_i_kid            | Ad4   |
  +----+----------------------+-------+
  | 17 | it_is_just_the_boobs | Zc5   |
  +----+----------------------+-------+
  | 18 | thank_god            | 102   |
  +----+----------------------+-------+
  | 44 | no_kidding           | jjy   |
  +----+----------------------+-------+
  </code></pre>
  
  <p>First, I need to select one row based on specific value from one of its column. I know how to do that:</p>
  
  <pre><code>SELECT `value` 
  FROM `TABLE` 
  WHERE name = 'i_like_women'
  </code></pre>
  
  <p>This will select one row with id 12 with the value lla.</p>
  
  <p>What I need is to select another at least two rows: one with the name 'not_bad' and one with the name 'are_you_serious' without specifying it. Or, in other words, previous and next one relative to this selected one.</p>
  
  <p>In short, three rows should be selected based on one value. I'm new to MySQL, as you can guess.</p>
  
  <p>Thanks for your time and attention. Enjoy helping me.</p>