title: Get previous & next id value of mysql query
body: <pre><code>SELECT * FROM TableName WHERE name='test'
  </code></pre>
  
  <p>Once the above query is executed I want the previous and next id values. Ofcourse they will not be incremental.  How can I get the next and previous ids based on the where condition.</p>