fmogavero has asked for the wisdom of the Perl Monks concerning the following question:
The if (! ref($row)){next;} does not work. It prints out two references:DBI::db=hash(0xwhatever) and DBI::st=hash(0xwhatever)and then the information that I want.while (my $row = $sth->fetchrow_arrayref) { foreach ($row){ if (! ref($row)) { next; } print @$row, "\n"; } }
That is the secondary question and is probably cranial-rectal insertion on my part.
My primary question is: Can I use fetchall_arrayref to return all of the rows that match my query, and then parse out the information? And if so, how?
I have a query like
I would like to have all the info in computer memory to avoid tying up the database with a fetchrow_arrayref because from what I read the DBI information says that fetchall_arrayref returns an array of array references, one reference per row."select program, day, time from TVviewingsked where name = "Frank"
Am I even on the right track here?
Edit: chipmunk 2001-05-15
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help with codefetchall_arrayref/code
by dustacio (Monk) on May 15, 2001 at 20:49 UTC | |
by dustacio (Monk) on May 15, 2001 at 20:51 UTC | |
|
Re: Help with fetchall_arrayref
by mwp (Hermit) on May 16, 2001 at 05:46 UTC | |
|
Secondary Question fixed.
by fmogavero (Monk) on May 15, 2001 at 21:30 UTC |