OK. I've never played with mySQL (sticking to sturdy ol' Oracle) but I guess you must be able to create a cursor, and do previous/next operations to it.
Perhapps by testing for KEY_UP AND KEY_DOWN.
/t0mas
Cursors are still on MySQL development team's todo list.
But in the meantime I found another, more Perlish solution:
Tie::DBI, available on CPAN. Tie a hash to an SQL table
and get table records by accessing the elements in the
hash. Obviously, there's a performance penalty, but now
my program takes up 9MB less memory. Cool.