Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Search Specific Field

Quote Reply
Search Specific Field
Heya all,

Is there a way to search a specified field in you database only - excluding all others?

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: Search Specific Field In reply to
Only index the field you want to search. Set index value to zero on the others.

Quote Reply
Re: Search Specific Field In reply to
That won't do it...I believe that Sangiro is asking how can people search only one field over another LIKE in the Administration search form, NOT by keyword field (query). Wink

Regards,

Eliot Lee
Quote Reply
Re: Search Specific Field In reply to
Sure, just pass into search.cgi the field you want to search on. For instance: search.cgi?Title=Gossamer would do a search for the word Gossamer in the title.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Search Specific Field In reply to
Simple - thanks!

Safe swoops
Sangiro
http://www.dropzone.com/
Quote Reply
Re: [sangiro] Search Specific Field In reply to
This doesn't exlude all other fields though. At least not in user searching. How would I do that?


Dustin Shelby
http://www.neptin.com
Quote Reply
Re: [Neptin] Search Specific Field In reply to
Can you give an example of what you are trying to do?

Cheres,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Specific Field In reply to
I am using Links SQL as an episode guide for a TV show. I have added fields for the writer and director of of each episode. I have created a link from each persons name to search for other episodes written/directed by that person. When I used the method suggested above it search ALL fields.. not just the one i specified.


Dustin Shelby
http://www.neptin.com
Quote Reply
Re: [Neptin] Search Specific Field In reply to
In Reply To:
Sure, just pass into search.cgi the field you want to search on. For instance: search.cgi?Title=Gossamer would do a search for the word Gossamer in the title.

What if you don't want to specify the term to be searched for, but you still want to search only 1 field?

What I am trying to do is enable an open search of the SKU field only by providing a text box for my customers to enter the SKU that they are searching for:

Quote:
search.cgi?SKU=

In Reply To:
This doesn't exlude all other fields though. At least not in user searching. How would I do that?

I also want to make sure that I exclude the other fields with this SKU-specific search.

Thanks for your help


------------------------------------------
Quote Reply
Re: [DogTags] Search Specific Field In reply to
** Bump **

------------------------------------------
Quote Reply
Re: [Neptin] Search Specific Field In reply to
Hi,

I'm not sure I understand. If you do:

http://www.gossamer-threads.com/...h.cgi?Title=Gossamer

It ONLY looks at links whose Title contains Gossamer. That's all the search does. You could just do

search.cgi?Director=George+Lucas

to find all entries where the director is George Lucas.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [DogTags] Search Specific Field In reply to
Hi,

All you need to do is add:

<form action="search.cgi" method="get">
SKU: <input name="SKU"> <input value="Search!" type="Submit">
</form>

to your page and that's it. =)

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Specific Field In reply to
Is there a way to do this with a link?


Dustin Shelby
http://www.neptin.com
Quote Reply
Re: [Neptin] Search Specific Field In reply to
Sure,

search.cgi?SKU=1234

to find an entry where sku=1234.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Specific Field In reply to
What's 1234?


Dustin Shelby
http://www.neptin.com
Quote Reply
Re: [Neptin] Search Specific Field In reply to
The SKU number you want to search for.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Search Specific Field In reply to
Ok.. thanks!


Dustin Shelby
http://www.neptin.com
Quote Reply
Re: [Alex] Search Specific Field In reply to
Quote:
<form action="search.cgi" method="get">
SKU: <input name="SKU"> <input value="Search!" type="Submit">
</form>
Alex, I can't believe it. I've done that same bit of code several times before. I completely forgot it...Blush

Thanks for reminding me!

------------------------------------------
Quote Reply
Re: [Alex] Search Specific Field In reply to
How do I search in 2 or more specific fields only? So, if I wanted to look for "Gossamer" in the Title and the Description only.

Safe swoops
Sangiro
Quote Reply
Removed In reply to
Removed