View Full Version : How do I find a single record and the next record after it only
10-03-2011, 08:56 AM
I wish to query for an entry using `Pid` and the one that follows after it, using ORDER BY `Pid`
The `Pid` is not always nubmers. There is no "index" due to this.
10-03-2011, 03:32 PM
I'm not used to working with non-numeric indexes but this should work:
SELECT * FROM the_table
WHERE Pid >= 'the_index'
ORDER BY Pid ASC
Note that this is just going to get the two next to each other in alphabetical order, so I hope that's what you need.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.