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

Re: [jdgamble] search on custom table if no search results

Quote Reply
Re: [jdgamble] search on custom table if no search results In reply to
Jonathan you are right, it was my mistake there seems to be no way to integrate the results of the global in the links results.
But this is not necessary, because I only want to get results from the custom table if there are no results from the links table.
Code:
sub {
my $tags = shift;
my $db= $DB->table('cars');
my $sth = $db->select({ brand => $tags->query });
while (my $rec = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display('brand', $rec);
}
return $output;
}




Now, I have an addidtional question about your global....how can I make this search global more sophisticated?

for example: if the value in 'brand' is "Mercedes Benz Cars"
and the user does a search query for Mercedes Benz the global should do a search for +Mercedes +Benz
and find the value 'Mercedes Benz Cars' as a result.

Thank you for your help
Subject Author Views Date
Thread search on custom table if no search results P-Man 3423 Sep 12, 2006, 4:05 AM
Thread Re: [P-Man] search on custom table if no search results
jdgamble 3343 Sep 12, 2006, 7:29 AM
Thread Re: [jdgamble] search on custom table if no search results
P-Man 3315 Sep 12, 2006, 12:39 PM
Thread Re: [P-Man] search on custom table if no search results
jdgamble 3312 Sep 14, 2006, 8:45 PM
Thread Re: [jdgamble] search on custom table if no search results
P-Man 3307 Sep 20, 2006, 3:07 AM
Post Re: [P-Man] search on custom table if no search results
jdgamble 3264 Sep 20, 2006, 8:47 AM