On Tuesday 27 February 2007 11:43, Bob Hunter wrote:
> I have a better question for you.
>
> I make extensive use of the following Pg method, which
> returns the value of the given record and field
> number:
>
> $sth->getvalue($rn,$fn)
>
> In particular, I use statements like
>
> $sth->getvalue($rn+$i,$fn-$j)
>
> where the the number of record/field are displaced by
> variables. As far as I can see DBI has a method to
> work one row at the time, in sequence. This is way too
> simple to handle the case above. I looked for a more
> powerful DBI method, but it does not seem to exist. Is
> it so? Does DBI have an equivalent to Pg' method
> "getvalue"?

You can simply load all the data into an array (using a variation of 
fetchall_...) of arrays or hashes and access via the array.  DBI allows you 
to choose the data structure coming back--hash-based or array-based.  

Sean

Reply via email to