in reply to Re^3: use of DBI perl function fetchall_arrayref
in thread use of DBI perl function fetchall_arrayref

I made the change, no effect, I'm still getting the same thing. Now, here is my code:
my $rows = $sth_tss->fetchall_arrayref; # print Dumper $rows; $count = 0; print $CGI->p("rows is ", @{$rows}); for my $row ( @{$rows} ) { $CGI->p("Row", ++$count); my @fields = @{$row}; for my $field ( @fields ) { print $CGI->p($field); } }

The commented out dumper worked well, I'm definitely getting the data, I just don't know how to access it. I even tried it with just

my @fields = $row

and that had no affect. Perl is as bad as C, if it is syntactically correct, it will do something, but not at all what you had in mind.

Replies are listed 'Best First'.
Re^5: use of DBI perl function fetchall_arrayref
by davorg (Chancellor) on Jan 26, 2007 at 16:07 UTC
Re^5: use of DBI perl function fetchall_arrayref
by Jenda (Abbot) on Jan 27, 2007 at 01:24 UTC
    Perl is as bad as C, if it is syntactically correct, it will do something, but not at all what you had in mind.

    Beg your pardon?!?

    If you take your keyboard and start typing random words and random punctuation, do you expect the result to make sense? Even if each single word passes the spellcheck? And if you are a tiny bit more carefull and take the time to change it to pass even though the grammar check? Would the random sentences make sense now? And would you pass the history test with that?

    The spelling and grammar check may help, but it's not going to make you a writer so if you expect the syntax check to ensure that your programs do what you wanted you should find a different trade.