Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

how to display URL in this script

Quote Reply
how to display URL in this script
hi, i used Laura's (afinlr) script to show the latest reviews on my site, but the problem is that in my links category, i only save/use the fields URL, ID, and Contact_Email.

what i want to know is how i can replace the ID (the category ID) with the actual category name..

Afinlr's script is this:

Code:
sub {
# Displays the newest links on the home page.
my ($output, $sth, $review);
my $search_db = $DB->table('Reviews');
$search_db->select_options ('ORDER BY Review_Date DESC');
$sth = $search_db->query_sth ( { Review_Validated => 'Yes' });
my $i=1;
review: while ($review = $sth->fetchrow_hashref) {
my $desc = $review->{Review_Contents};
unless (length $desc <= 60) {my $short = substr ($desc, 0, 60); $short =~ s/\s\S+?$//; $short .= " ..."; $review->{Review_Contents} = $short;}
$output .= Links::SiteHTML::display ('review_new', $review);
last review if ($i>=12);
$i++;
}
return $output;
}

i don't know how to return the actual link's category name instead of just the ID number associated with it in the review table.

please help! :) thanks a lot
-simon
http://www.fatscripts.com
Subject Author Views Date
Thread how to display URL in this script lastsaga 2725 Nov 8, 2004, 2:03 PM
Thread Re: [lastsaga] how to display URL in this script
afinlr 2646 Nov 8, 2004, 3:20 PM
Thread Re: [afinlr] how to display URL in this script
lastsaga 2655 Nov 8, 2004, 5:14 PM
Thread Re: [lastsaga] how to display URL in this script
afinlr 2634 Nov 8, 2004, 5:20 PM
Post Re: [afinlr] how to display URL in this script
lastsaga 2630 Nov 8, 2004, 5:36 PM