Gossamer Forum
Home : Products : DBMan SQL : Discussion :

home made queries

Quote Reply
home made queries
An introduction to this thread is here

In general, is it possible to write my own queries and get dbman sql to include them in the interface which users see?

Many thanks for any help / suggestions.
Tim Ault
Oxford UK
Quote Reply
Re: [timbo] home made queries In reply to
Yes, you can use the template global feature for this matter like:

sub {
my $results = $DB->table('table_name')->select()->fetchall_hashref;
return { loop_interface => $results }
}

And then it can be called in your html code:

<%template_global_name%>
<%loop loop_interface%>
<%field1%>
<%field2%>
.....
<%endloop%>

TheStone.

B.
Quote Reply
Re: [TheStone] home made queries In reply to
Hmm, Could you give me a bit more help on how to do this? I don't understand where the query is or how to call it.

thanks
Tim Ault
Oxford UK