No worries.
Pretty simple really;
my $ID = $_[0];
my $field = $_[1];
my $table= $_[2];
my $val = $DB->table($table)->select( [$field], { ID => $ID })->fetchrow;
return $val;
}
Call with;
<%global_name($ID,'FieldNme','TableName')%>
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote:
One more thing... how can I now use this ID to retieve all the info (or just the title) of a specific link? In other words, if I've saved a value (ID) above I would somehow like to use a global with a tag like <%global name($ID)%> to return the title of that link.Pretty simple really;
Code:
sub { my $ID = $_[0];
my $field = $_[1];
my $table= $_[2];
my $val = $DB->table($table)->select( [$field], { ID => $ID })->fetchrow;
return $val;
}
Call with;
<%global_name($ID,'FieldNme','TableName')%>
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!