Gossamer Forum
Quote Reply
Get Full_Name
Hello everybody

i am so stupidFrown

i want to use following global but i don't know how to get the Full_Name

sub {
my $output;
my $cat_db = $DB->table('Category');
my $cat_id = $_[0];
$cat_db->select_options('ORDER BY Full_Name');
my $sth = $cat_db->select ( {'Name' => $cat_id}, ['ID','Full_Name','Name'] );
while (my ($id,$cat,$heading) = $sth->fetchrow_array) {
my $linkdb = $DB->table('Links','CatLinks');
my $url = $cat_db->as_url($cat);

$output .= qq~$heading (<a href="/$url">FULL_NAME</a><br>)~;
}
return $output;
}


please help me again

MarinaFrown
Quote Reply
Re: [mkoenig] Get Full_Name In reply to
$output .= qq~$heading (<a href="/$url">$cat</a><br>)~;

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 Reply
Re: [Andy] Get Full_Name In reply to
Thank you Andy

can i ask you another Question?

Where is my fault:

sub {
my $id = shift;
my $db = $DB->table('Category');
my $clean = $DB->table('Category')->select('Name', { ID => $id })->fetchrow;
my $url = $db->as_url($clean);
return $url;
}

i only want the Name of the category not the Full_Name

Marina
Quote Reply
Re: [mkoenig] Get Full_Name In reply to
Code:
sub {
my $id = shift;
my $db = $DB->table('Category');
my $clean = $DB->table('Category')->select('Name', { ID => $id })->fetchrow;

my $url = $db->as_url($clean);
return $url;
}

<%global_name($ID)%>

That should work :)

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: Jan 15, 2004, 8:11 AM
Quote Reply
Re: [Andy] Get Full_Name In reply to
Hi Andy

sorry

i need a clean Name of category not a clean Full_Name

Marina
Quote Reply
Re: [mkoenig] Get Full_Name In reply to
How about the modified version above?

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 Reply
Re: [Andy] Get Full_Name In reply to
right

Thank you it works

MarinaSly