Hi!
2015-08-26 16:51 GMT+03:00 Richard Reina <[email protected]>:
> I have this table data that I load into a template as follows.
>
> $q = "SELECT ID, NAME
> FROM jobs
> ORDER BY NAME";
Here you may just query with one line:
my $Jobs_ref = $dbh->selectall_arrayref( $q, { Slice => {} } );
And now in template
<% FOREACH job IN Jobs %>
<option value="<% job.ID %>"><% job.NAME %></option>
<% END %>
So you will use exact order, like you got from DB.
Wbr,
--
Kõike hääd,
Gunnar
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users