I'm with you alex, I tend to only use classes when I've got
to maintain state, I just use a function otherwise. Here's
how I'd likely code this ...
SELECT * from some_table where idx >= 5
Then, once you are staring at the records that came back
(and are sure they are the ones you want to delete),
change SELECT * to DELETE (and change nothing else) and
rerun. DELETE from some_table where idx >= 5
Pretty hard to get it wrong with this approach ;-) http://en.wikipedia.org/wiki/Lamarckism