Im trying to find a way to show priority links seprately on a search results page. Ive seen globals that does priorty links which is fine, but what I need is a global that displays say 4 priorty links that are matches to keywords used away from the normal link results.
Ive found a global that does something similar:
-----
sub {
my $tags = shift;
my $query = $tags->{query};
my $sth = $DB->table('Links')->select ( { Keyword => $query } );
my $output; while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link_sponsor_search', $link);
}
return $output;
}
-----
The global does a search on a column called Keyword.
What I would need is a global like above but that does a search as normal, however only displays priorty links,
in my database I indicate priority links with a simple Yes or No column. So basically would need a global that displays search results where this column, priorty = Yes
Can this be done? Anyone knows how to do it???
Thanks
Ive found a global that does something similar:
-----
sub {
my $tags = shift;
my $query = $tags->{query};
my $sth = $DB->table('Links')->select ( { Keyword => $query } );
my $output; while (my $link = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('link_sponsor_search', $link);
}
return $output;
}
-----
The global does a search on a column called Keyword.
What I would need is a global like above but that does a search as normal, however only displays priorty links,
in my database I indicate priority links with a simple Yes or No column. So basically would need a global that displays search results where this column, priorty = Yes
Can this be done? Anyone knows how to do it???
Thanks