| 
 Posted by Joshie Surber on 11/16/05 05:52 
> have a smart SQL qquery that will fetch it correctly for me in one pass? 
 
If you are fairly sure that the IDs are sequential, you may try "where 
id<CURRENTID+2 OR id>CURRENTID+2 (my brain isn't working logicly now... 
you may need to flip the + and - signs) 
 
If they aren't sequential, make an educated guess about how 
insequential they are and grab 10 or so on each side and filter out all 
but the five you want in your script. It is a lot faster to grab a lot 
of stuff in one query and filter it in your script than to grab a 
little stuff in two or more queries. 
 
Hope this gives you some ideas.
 
[Back to original message] 
 |