What I was trying to achieve was to be able to display the Priority / Premium listed sites Logo / Graphic per category. This will do it:[ Modified $premium global ] Graphic column being "Logo"
sub {
# Displays the isPriority listed links logo per category on the category home page.
my $id = shift;
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY isPriority DESC', 'LIMIT 10');
my $sth = $db->select ( { isPriority => 'Yes'}, { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Logo', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes'} );
my $premium;
while (my ($id,$logo,$name,$url) = $sth->fetchrow_array) {
$premium .= "<a href='http://www.your_site.com/cgi-bin/jump.cgi?ID=$id' target='_blank'><img src='$logo' border='0'></a><br>";
}
return $premium;
}
Regards
minesite
sub {
# Displays the isPriority listed links logo per category on the category home page.
my $id = shift;
my $db = $DB->table ('Links','CatLinks');
$db->select_options ('ORDER BY isPriority DESC', 'LIMIT 10');
my $sth = $db->select ( { isPriority => 'Yes'}, { 'CatLinks.CategoryID' => $id}, ['Links.ID', 'Links.Logo', 'Links.Title', , 'Links.URL'], { isValidated => 'Yes'} );
my $premium;
while (my ($id,$logo,$name,$url) = $sth->fetchrow_array) {
$premium .= "<a href='http://www.your_site.com/cgi-bin/jump.cgi?ID=$id' target='_blank'><img src='$logo' border='0'></a><br>";
}
return $premium;
}
Regards
minesite