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:
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...)
Quote Reply
Re: [SaraBem] Help on fix a Global In reply to
Wow, the code is OK.
The problem is the interface between the keyboard and the chair!

Thank you all and enjoy the code if you need it.
(Maybe I have to apply a darker hair color...)

Blondies can have brains (sometimes...)

Last edited by:

SaraBem: Apr 17, 2007, 7:31 PM