Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [sangiro] Returning ID as value in dropdown: Edit Log

Here is the list of edits for this post
Re: [sangiro] Returning ID as value in dropdown
No worries.

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!

Last edited by:

Andy: Oct 21, 2004, 8:54 AM

Edit Log: