I wrote a huge question -that I've been stuck on for a while with all my code- but it came down to a simple question; How can I select a row from a mysql database that is one greater than a said value.
ie; if my known value is "5" and my unknown next greatest value is "23", what query will get me to '23'
edit: my apologize, when I read my question out loud I figured it out:
SELECT * FROM table WHERE value > '5' ORDER BY value ASC LIMIT 1;