This is actually a better version =)
my $User = $_[0]
my $field = $_[1];
my $hit = $DB->table('Users')->select( { Username => $User } )->fetchrow_hashref;
my $Name = $hit->{$field} || "None";
return $Name;
}
Then just call with:
<%global_name($LinkOwner,'FieldName')%>
..i.e
<%global_name($LinkOwner,'Address')%>
..which would return the value of "Address" for the LinkOwner in question.
The image bit is a bit harder. I'll see what I can come up with.
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!
Code:
sub { my $User = $_[0]
my $field = $_[1];
my $hit = $DB->table('Users')->select( { Username => $User } )->fetchrow_hashref;
my $Name = $hit->{$field} || "None";
return $Name;
}
Then just call with:
<%global_name($LinkOwner,'FieldName')%>
..i.e
<%global_name($LinkOwner,'Address')%>
..which would return the value of "Address" for the LinkOwner in question.
The image bit is a bit harder. I'll see what I can come up with.
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!