now i have a route
sub {
my $ordernumber= '4646x';
# Displays links table join
my ($output,$sth,$orderlistxx,$orderlistxx1);
my $search_db = $DB->table('orderlistxx','orderlistxx1');
$sth = $search_db->select ( { orderidtrackm => $ordernumber});
while ($orderlistxx = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('8orderlistxx', $orderlistxx);
}
return $output;
}
it works well
now i want to use
<%row_num%> - a counter for what row is being looped, starts at 1.
<%rownum%> - an alias for <%row_num%>
<%first%> - boolean value that is true if this is the first row, false otherwise.
<%last%> - boolean value that is true if this is the last row, false otherwise.
<%inner%> - boolean value that is true if this is not first and not last.
<%even%> - boolean value is true if row_num is even.
<%odd%> - boolean value is true if row_num is odd.
which is only available to loop
so i try to conver the route to loop
sub {
my $ordernumber= '4646x';
# Displays links table join
my ($output,$sth,$orderlistxx);
my $search_db = $DB->table('orderlistxx','orderlistxx1');
$sth = $search_db->select ( { orderidtrackm => $ordernumber});
while ($orderlistxx = $sth->fetchrow_hashref) {
push @orderlistxx, $orderlistxx;
}
return {
8leftjoinloop => \@orderlistxx }
}
however it seems i something wrong with it as i get nother when i
put <%if first%>white<%else%>silver<%endif%>
there should be something wrong with the sub
i wonder anyone here could help me?
Thanks in advance
sub {
my $ordernumber= '4646x';
# Displays links table join
my ($output,$sth,$orderlistxx,$orderlistxx1);
my $search_db = $DB->table('orderlistxx','orderlistxx1');
$sth = $search_db->select ( { orderidtrackm => $ordernumber});
while ($orderlistxx = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('8orderlistxx', $orderlistxx);
}
return $output;
}
it works well
now i want to use
<%row_num%> - a counter for what row is being looped, starts at 1.
<%rownum%> - an alias for <%row_num%>
<%first%> - boolean value that is true if this is the first row, false otherwise.
<%last%> - boolean value that is true if this is the last row, false otherwise.
<%inner%> - boolean value that is true if this is not first and not last.
<%even%> - boolean value is true if row_num is even.
<%odd%> - boolean value is true if row_num is odd.
which is only available to loop
so i try to conver the route to loop
sub {
my $ordernumber= '4646x';
# Displays links table join
my ($output,$sth,$orderlistxx);
my $search_db = $DB->table('orderlistxx','orderlistxx1');
$sth = $search_db->select ( { orderidtrackm => $ordernumber});
while ($orderlistxx = $sth->fetchrow_hashref) {
push @orderlistxx, $orderlistxx;
}
return {
8leftjoinloop => \@orderlistxx }
}
however it seems i something wrong with it as i get nother when i
put <%if first%>white<%else%>silver<%endif%>
there should be something wrong with the sub
i wonder anyone here could help me?
Thanks in advance