[ic] SQL inside UserTags
Andy Mayer
interchange-users@icdevgroup.org
Fri Apr 4 11:11:01 2003
Hi there,
I am trying to perform an SQL query inside a usertag, and I am having
difficulty finding complete examples in the documentation.
Could somebody please post an example of a usertag that:
1. Selects a data from a single table
2. Outputs the result from the UserTag
I have started with the following code, but I can't figure out how to
access the query results and work out how many rows returned etc.
--------
my $sql = "select c_author from c_people";
my $result_array = $Tag->query( { wantarray => 1, sql => $sql, }, $body
);
my ($same_results, $col_name_hash, $col_name_array) =
$Tag->query( { sql => $sql, },
$body );
my $result_hasharray = $Tag->query( { sql => $sql,
hashref => 'my_results', },
$body );
--------
Please be gentle, as I am not hardcore perl.... yet ;)
Cheers,
Andy
--
Andy Mayer
West Royd
127 Manchester Road
Sheffield S10 5DN
United Kingdom
--
t: +44 (0) 114 2631336
m: +44 (0) 7976 717210
e: info@andymayer.net
w: www.andymayer.net
--