Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [Alba] auto write field

Quote Reply
Re: [Alba] auto write field In reply to
Yes, it can be done by using the global template below:

sub {
my $tab = $DB->table('table_name');
$tab->select_options('GROUP BY category', 'ORDER BY category');
return { categories => $tab->select()->fetchall_hashref };
}

HTML code:

<%global_name%>
<select name="...">
<%loop categories%>
<option value="<%category%>"><%category%></option>
<%endloop%>
</select>

Hope that helps.

TheStone.

B.
Subject Author Views Date
Thread auto write field Alba 3366 May 28, 2005, 4:39 AM
Thread Re: [Alba] auto write field
604 3210 May 30, 2005, 10:31 AM
Post Re: [TheStone] auto write field
Alba 3205 May 30, 2005, 11:28 AM