Alright....
I know my template code is fine. 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 || []);
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 = $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");
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 binders
Please help me solve this problem. |