Thanks, Adrian. It works! I knew I was on the right track ...
For reference, here is the sub main I use here:
$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> <span style="color:green;overflow:hidden;">$result->{Full_Name}</span></li>\n|;
}
print qq|</ul>|;
}
So, on to next challenge
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?
John
For reference, here is the sub main I use here:
Code:
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> <span style="color:green;overflow:hidden;">$result->{Full_Name}</span></li>\n|;
}
print qq|</ul>|;
}
So, on to next challenge
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?
John