Gossamer Forum
Home : Products : DBMan : Customization :

Stricter Category Search

Quote Reply
Stricter Category Search
Greetings.

My DB now works almost perfectly...the only problem I have is this:

I'm using the category mod. What is happening, though, is that some categories share names and the cat. script is not differentiating between them. For intance, I may have "sopranos" and "mezzo-sopranos" as different categories, but when I click on the "Sopranos" or do a search under categories for "Sopranos", the "Mezzo-Sopranos" come up too.

The reverse, for some reason, is not true. When I search for "Mezzo-Sopranos" I get only Mezzo-Sopranos.

Any suggestions to make the category search more "strict"?

Here's the query:
http://www.funkhouserartists.com/cgi-bin/db/relational/db.cgi?db=artists&uid=default&Category=Mezzo-Soprano&Active=Yes&view_records=1

or just go to www.funkhouserartists.com and look under "artists".

Thanks in advance ;)



Quote Reply
Re: Stricter Category Search In reply to
You should add the following hidden field in your search form codes:

Code:

<input type="hidden" name="ww" value="on">


This will turn ON Whole Words, which means exact category/field/column matching.

Regards,

Eliot Lee
Quote Reply
Re: Stricter Category Search In reply to
hi...

but nope...it did not work...I tried using it with the search parameters and nothing...I still got the same results. Besides, I'm not sure how I would incorporate it with the Categories (which don't use a search and therefore, no hidden fields :(

Any suggestions?

Thanks again :)



Quote Reply
Re: Stricter Category Search In reply to
You simply add &ww=on if you not using a "search form" to the query string.

Trust me, it should work...Look at the following example:

http://anthrotech.com/...p;mh=0&vr=Search

And to see it from the "search form", go here:

http://anthrotech.com/...opps&uid=default

Select Cultural Resource Management in the Category field.

Regards,

Eliot Lee
Quote Reply
Re: Stricter Category Search In reply to
Hey, Eliot.

Thanks again., but nope. I still can't make it work.

I looked into the code for your database and I think I know why yours works: it is because your category keys are different than the names.

Even though Cultural Antropology and Cultural Social Affairs (or something like that) are similiar at first, they have very different category keys (the first is "cultural" the second "CRM", I believe).

In my case, things are a little more complicated, since the categories are hard-coded but display dinamicly on the page (so I cannot name them "mezzo-soprano" and have a value of "mz", for instance).

Take a look...you'll see what I'm talking about:

http://www.funkhouserartists.com/cgi-bin/db/relational/db.cgi?db=artists&uid=default&Category=Soprano&Active=Yes&view_records=1&ww=on

Once again, thanks a bunch :)

Luis
Master of All Insanity

Quote Reply
Re: Stricter Category Search In reply to
Well, the only other suggestion I have for you is to install the Fancy Select Field Mod, which is mentioned quite a few times in this forum and also referenced in JPDeni's and LoisC's web sites.

Regards,

Eliot Lee