>   >items.data_seek 0
>   #=> #<Mysql::Result:0x8d11930>
>
> and run it again
>
>   >items.each{|item|p item}
>     ["1", "item01"]
>     ["2", "item02"]
>     ["3", "item03"]
>   #=> #<Mysql::Result:0x8d11930>
>
> btw, you can also try Sequel rubygem for very easy installing &
> handling of sql (and you wont encounter problem above).
>
> hth.
> kind regards -botp

-botp,

I see now... db handling is like filehandling: if I fetch a row, I need 
to remember where I am in that result set in order to be able to fetch 
the next in line.
So it's like resetting a file pointer before reading the file again, 
only this time it's a recordset... makes perfect sense now.

I appreciate the help and the extra explanation: it allows me to have 
insight in stead of just a solution. Many thanks!

Andy

-- 
Posted via http://www.ruby-forum.com/.