LPM: DBI woes
Joe Hourcle
oneiros at dcr.net
Fri Feb 25 05:26:54 CST 2000
On Thu, 24 Feb 2000, Rich Bowen wrote:
> Well, one or more. ->fetch is an alias to ->fetchrow_arrayref, and so
> returns an array reference, which is not really what I want.
> fetchrow_array returns one row of the select as an array. If you only
> selected one field, it returns that one field in an array, which is what
> I want. I use the technique all the time.
> > So in a nutshell, I would try changing that one line to:
> > $day = $sth->fetch;
>
> I'm confused on this one. Now $day is an array reference, right? Do you
> use this in actual code? That is, is $day actually a field from the
> database. Does the method do some sort of wantarray in there, and intuit
> what you want?
If it's returning an array ref, can't you just do:
($day) = $sth->fetch;
(I'd look up how I normally do things, but I don't have my normal access
right now)
-----
Joe Hourcle
More information about the Lexington-pm
mailing list