I have hit a brick wall as far as ideas for a query I need to do. I have an application with an address book type of a function. Users will be looking at a detailed view of a person and a the top of the screen the will have the option (I hope) to click a "previous" or "next" button and see a detailed view of the next record in alphabetical order. Sounds easy enough.
Here's what I need to do. If the user is looking at the record of Mr. Johnson and clicks next, I need to somehow perform a query that looks for the next record alphabetically after Johnson, but my records are not ordered alphabetically, they are ordered by user_id's.
Is there some way to query a database with say a last name and compare it to the next alphabetical value of a last name in the database?