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

Re: [brewt] Suggest category

Quote Reply
Re: [brewt] Suggest category In reply to
Thanks, Adrian. It works! I knew I was on the right track ... Cool
For reference, here is the sub main I use here:
my $t = $DB->table('Category');
$t->select_options('ORDER by Full_Name DESC', 'LIMIT 25');
my $q = $IN->param('query');
my $cond = GT::SQL::Condition->new( 'Name', 'LIKE', "$q%");
my $sth = $t->select($cond);
my $base = 'http://slashdemocracy.org/links/';
print "Content-Type: text/xml\n\n";
if ($t->hits) {
print qq|<ul class="LSRes">|;
while (my $result = $sth->fetchrow_hashref) {
my $path = $t->as_url($result->{Full_Name});
print qq|<li onmouseover="liveSearchHover(this)" onclick="liveSearchClicked(this)"><a href="$base$path" name="$result->{Full_Name}">$result->{Name}</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:green;overflow:hidden;">$result->{Full_Name}</span></li>\n|;
print qq|</ul>|;

So, on to next challenge Wink

As for the green text, which produces the green output with Full_Name, I would like to show only the name of FatherID. Any suggestions?

Subject Author Views Date
Thread Suggest category gotze 2615 Jan 8, 2005, 12:39 PM
Thread Re: [gotze] Suggest category
jdgamble 2573 Jan 8, 2005, 2:39 PM
Post Re: [jdgamble] Suggest category
gotze 2572 Jan 8, 2005, 3:06 PM
Thread Re: [gotze] Suggest category
brewt 2570 Jan 8, 2005, 4:37 PM
Thread Re: [brewt] Suggest category
gotze 2567 Jan 8, 2005, 4:55 PM
Post Re: [gotze] Suggest category
Jag 2542 Jan 9, 2005, 9:27 AM
Post Re: [brewt] Suggest category
jdgamble 2563 Jan 8, 2005, 4:56 PM