Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Help on fix a Global

Quote Reply
Help on fix a Global
Hi all,

I'm trying to get all links for a specific Author AND the category Full_Name for each link found but I'm running in trouble.
Here is my code:
Code:
sub {
my $tags = shift;
my $author = $tags->{'Author'};
my ($sth,$link);

use GT::SQL::Condition;

my $search_db = $DB->table('Links','CatLinks','Category');
$search_db->select_options ('ORDER BY Title ASC');
my $sth = $search_db->select (['Links.ID', 'Links.Title', 'Category.Full_Name'], GT::SQL::Condition->new(['Author', '=', $author], ['isValidated', '=', 'Yes']));
my $output;
while ($link = $sth->fetchrow_hashref){
$link->{'detailed_url'} = "$CFG->{build_detail_url}/$link->{'ID'}$CFG->{build_extension}";
$output .=qq~<li><a href="$link->{'detailed_url'}" style="color: #333333;"><b>$link->{'Title'}</b></a><br>&nbsp;&nbsp;&nbsp;<i>$link->{'Full_Name'}</i><br><hr size="1" style="color: Silver;"></li>~;
}
if (!$output){return "No listings at this time.";}
else {return $output;}
}

I can't get it to work!
I don't know if I'm drinking too much coffee, I need to sleep onde of this days or I'm getting dumb but I can't find any error.
Can you point me what is wrong with this code.
Thanks a lot

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Blondies can have brains (sometimes...)
Subject Author Views Date
Thread Help on fix a Global SaraBem 1991 Apr 17, 2007, 7:15 PM
Post Re: [SaraBem] Help on fix a Global
SaraBem 1918 Apr 17, 2007, 7:30 PM