in reply to Re: HTML::Template-Displaying DB Records
in thread HTML::Template-Displaying DB Records
And the rows displayed in the template. The problems seems to be with selectall_arrayref. But when I print $rows, an address is displayed-I just think $rows is empty or something. I cannot for the life of me figure out how to test selectall_arrayref. And yes I tried:my $rows=[ # { # TicketNo => 1, # Customer => "Foo", # UserName => "Foo", # DateSubmission =>"Foo", # Via =>"Foo", # Medium =>"Foo", # Issues =>"Foo", # SupportType =>"Foo", # Description =>"Foo", # Detail =>"Foo", ## AssignTo =>"Foo", # Status =>"Foo", # Remarks =>"Foo", # Priority =>"Foo", # ETD =>"Foo", # ClosedDate =>"Foo", # ClosedName =>"Foo" ## }, ## { # TicketNo => 2, # Customer => "Blah", # UserName => "Blah", # DateSubmission => "Blah", # Via => "Blah", # Medium => "Blah", # Issues => "Blah", # SupportType => "Blah", # Description => "Blah", # Detail => "Blah", # AssignTo => "Blah", # Status => "Blah", # Remarks => "Blah", # Priority => "Blah", # ETD => "Blah", # ClosedDate => "Blah", # ClosedName => "Blah" # } # # ]; #$template->param(ROWS => $rows || []);
Removed the COlumns=>{}-But it makes no difference. What can I do to debug further? How can I check whether selectall_arrayref returns something (besides how I am doing it now). And I must mention here that I am relatively new to perl-about 2-3 months old. About place bindersmy $rows = $dbh->selectall_arrayref("SELECT TicketNo, Customer, UserNa +me, DateSubmission, Via, Medium, Issues, SupportType, Description, De +tail, AssignTo, Status, Remarks, Priority, ETD, ClosedDate, ClosedNam +e FROM TSIssuesTable WHERE Customer LIKE $quotedString1 AND Priority +LIKE $quotedString2 AND TicketNo LIKE $quotedString3 AND DateSubmissi +on LIKE $quotedString4");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: HTML::Template-Displaying DB Records-Still struggling
by perrin (Chancellor) on May 25, 2004 at 20:27 UTC | |
by thisisperl (Novice) on May 25, 2004 at 21:23 UTC | |
by perrin (Chancellor) on May 26, 2004 at 16:51 UTC |