Gossamer Forum
Home : Products : Gossamer Links : Discussions :

search question

Quote Reply
search question
Hi,

I searched the forums. Too many results for 'search results' and i didn't found what i am looking.

Can user search based on 'Yes' or 'No' or some other specific value like '4 days' (FOR ENUM FIELDS OF DATABASE) in the search? Here i have to keep some more drop down lists on search form page with enum field values in the drop down lists?

Something like we do in admin panel. Searching for specific link based on 10-15 criteria.(selecting drop downlists and exactly etc. Thogh not much complicated for web site visitor)

thanks.
Quote Reply
Re: [hegu] search question In reply to
I think you can do it by passing in the field=>value pairs to the search routines. It will search fields for those values, but I'm not sure if it works as expected. Complex searches are one of the lesser explored areas of links sql (though not requested or planned for).

+word -- include "word"
-word -- exclued "word"
"phrase" -- exact phrase (+/- work with +"phrase" as well)
substring* -- *string, string*, or *string*

Query=SearchTerm&field_name=value&field_name1=value1...etc

using drop down boxes, you could provide the values for field_name,

go for it :)


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] search question In reply to
Hi pugdog,

Thanks for answering.

Can you explain it in simple words?Blush sorry. Here you are talking to a pure non techie.

thanks.
Quote Reply
Re: [hegu] search question In reply to
Just add the drop down boxes you wanted, inside the search form.

Name the tags the same as the field, so that the fieldname is passed in with the value. Links should do the rest. "name" should be the field in the links table, and "value" should be one of the ENUM values in that field.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] search question In reply to
Hi pugdog,

COOLSmile

It is working great. Thanks.

I want to keep a seperate search form for ONLY one of the main categories and all other main categories under 'Home' go with default form. I am trying that now.
Quote Reply
Re: [hegu] search question In reply to
Hi pugdog,

COOLSmile

It is working great. Thanks.

I want to keep a seperate search form for ONLY one of the main categories and all other main categories under 'Home' go with default form. I am trying that now. My question is:

1. i have to save search.cgi with different name(search1.cgi or whatever) and use it for that particular category?

OR

2. I can use <%if category_id ==181%>
html code with dropdownlist <%endif%>
in search.html

WHICH ONE IS ADVISABLE?

Thanks.
(My IE crashing down when i am trying to edit my post. So posting new one)
Quote Reply
Re: [hegu] search question In reply to
Hi,

I created seperate search form for one category with action=path/to/search.cgi in the form.

There are 8 drop down boxes + regular text box to enter the keyword for the user to choose particular feature for the product to search for.

My question is:

How to force the user to enter atleast one field instead of clicking on 'Search' button with empty feilds?

thanks.
Quote Reply
Re: [hegu] search question In reply to
Maybe with Javascript.