Thanks Tony
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Tony Foiani (non-HP)
> Sent: Monday, February 26, 2001 2:57 PM
> To: Tim Harsch
> Cc: Rolf Kamp; [EMAIL PROTECTED]
> Subject: RE: best way to select 1 row
>
>
> >>>>> "Tony" == Tony Foiani (non-HP) <[EMAIL PROTECTED]> writes:
>
> Tony> Note that this probably won't do what you want (unless
> Tony> "selectrow_array" is smarter than I expect), since you're trying
> Tony> to assign an array value (on the right hand side) into a scalar
> Tony> variable (on the left hand side). This is as though you had
> Tony> typed:
>
> >>>>> "Tim" == Tim Harsch <[EMAIL PROTECTED]> writes:
>
> Tim> According to the book, p. 208. "If called in a list context, it
> Tim> returns the first row of data from the statement. If called in a
> Tim> scalar context, it returns the first field of the first row."
>
> I sit corrected. :)
>
> Tim> How do you do a prepare on selectrow and selectcol methods?
>
> One good quote deserves another. From "perldoc DBI":
>
> | selectrow_array
> |
> | [...] The $statement parameter can be a previously prepared
> | statement handle in which case the prepare is skipped. [...]
> |
> | selectall_arrayref
> |
> | [likewise]
> |
> | selectcol_arrayref
> |
> | [likewise]
>
> So, you just prepare the statement and get a handle for it, then feed
> that to the appropriate method.
>
> t.
>