Take a look at the global template below:
sub {
my $results = $DB->table('table_name')->select(['DISTINCT column1', 'column2'])->fetchall_hashref;
return { loop_select => $results };
}
Your html code should look like:
<%global_name%>
<select name="select">
<%loop loop_select%>
<option value="<%column2%>"><%column2%></option>
<%endloop%>
</select>
Hope that helps.
TheStone.
B.
sub {
my $results = $DB->table('table_name')->select(['DISTINCT column1', 'column2'])->fetchall_hashref;
return { loop_select => $results };
}
Your html code should look like:
<%global_name%>
<select name="select">
<%loop loop_select%>
<option value="<%column2%>"><%column2%></option>
<%endloop%>
</select>
Hope that helps.
TheStone.
B.