Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Search global - need help

Quote Reply
Search global - need help
Hi,

I need some help by creating a search global.

What I want to do is to split a query(keyword) into its components by using SPACE as delimiter.

then I want to search my database for each word of the query. Only 3 columns should be searched.

Example:

Query: ..db.cgi?db=products&keyword=microsoft+xbox&...

Search table products, Columns name,brand,description for microsoft OR xbox



loop the results in search_result.html using mh=15 -tag.

Does anyone has any solutions?

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Jan 14, 2003, 3:19 AM
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
Hi Manu,

I think this plugin might be helpful for you. The LetterSearch plugin allows you to do a search for each word of query.

TheStone.

B.
Quote Reply
Re: [TheStone] Search global - need help In reply to
Thanks for the plugin. It's a very little beginning but not that what I need!

The plugin finds only multiple words if they are in a row in a column.



Example: keyword=mexx+parfum

The plugin finds: Mexx Parfum 50ml

But it does NOT find: Mexx Diversity Parfum 50ml

But that is what I need!

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
You should customize the plugin a little bit then Tongue

TheStone

B.
Quote Reply
Re: [TheStone] Search global - need help In reply to
Hi,

ok, now I've understood what you ment with the plugin.

I am not really sure what the query-syntax is:

.../db.cgi?keyword=yamaha&db=Produkte&do=search_results&col=Produktname&mh=15&mul=1

gives me a result but if I add

../db.cgi?keyword=yamaha&db=Produkte&do=search_results&col=Produktname&mh=15&mul=1&let=y

my keyword-result-counter has 1300 results but nothing is display except a message "No results"

the same is when I use:

.../db.cgi?let=yamaha&db=Produkte&do=search_results&col=Produktname&mh=15&mul=1

SO WHAT THE HELL IS THE RIGHT SYNTAX ???

Another thing:

Am I right, that I have to do the following if I want to search for words and not for letters?:




...

my $db = $home->{cgi}->{db};
my $table = $DB->table($db);
$table->select_options("Order by $column",$limit);
my $cond = GT::SQL::Condition->new ();
if ($home->{cgi}->{mul}) {
my $words = [split /\s/,$letter]; # CHANGE TO: my $words = [split / /,$letter]; ???
$cond->{bool} = 'OR';
foreach (@$words) {
($_) and $cond->add($column,'LIKE',"%$_%");
}
...






Thanks!

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
...up..

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
Hello,

someone out there ????????????



I still need some hlep (or a Plugin!).

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
MadWOW - I like the support in this DBManSQL-Forum !!!!

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] Search global - need help In reply to
I'll try answering this one for you:

Quote:
Am I right, that I have to do the following if I want to search for words and not for letters?:

split /\s/ and split / / are essentially the same. But using \s splits on whitespace which is already matching words isn't it?

Last edited by:

Paul: Feb 3, 2003, 5:44 AM