Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Search a Single Field

Quote Reply
Search a Single Field
Anyone know the syntax of the search command to search a 'particular field', in other words, from a menu item I want to send a command to search.cgi to only search for matching item 'abcde' in field 'abc'.

I've checked all the FAQ's etc, and the more I read about searching the more confused I get!

Thanks in advance,


Clint.



[This message has been edited by Clint (edited March 31, 2000).]
Quote Reply
Re: Search a Single Field In reply to
So you want to let your user decide which field to search on?

Widgetz made a mod like that for Links 2.0, I think it is talked about here:
http://www.gossamer-threads.com/...um3/HTML/003409.html

Maybe this will give you some ideas on how to port it into Links SQL.

------------------
Robert Blackstone
Webmaster of Scato Search
www.scato.com
Quote Reply
Re: Search a Single Field In reply to
Hi Robert:

thanks for the link - however Widget's site is offline and none of the links work.

What I am actually trying to do is this:

I run an Affiliate Programs Directory and one of the most popular type of program are those that offer a two-tier commission structure. How I list them at the moment is via a link from my menu search.cgi?query=two-tier - this at the moment searches both the titles and description fields (they are the only ones I have indexed).

I have since created a field for Two-Tier so I wanted to create the same sort of link, however it would only search the 'twotier' field for a precondition such as 'twotier', 'pay per sale' etc. (thus not having to search thousands of lines of text).

I hope this explains a little better what I am hoping to achieve.

Regards,



------------------
Clint
----------------------------------
www.AffiliatesDirectory.com
Proud Supporter of Links SQL
----------------------------------




Quote Reply
Re: Search a Single Field In reply to
There has to be some way to do that. I can remember with Links 2.0, that you could do something like this:

search.cgi?Title=AssociateDirectory

What you could do is place in the field name, and set it equal to something, like:

search.cgi?two-tier=yes


I'll look into this, and hopefully we'll get a solution.



------------------
Robert Blackstone
Webmaster of Scato Search
www.scato.com
Quote Reply
Re: Search a Single Field In reply to
You can filter search results as in "search for the term abcdef, and that have field=abc". However, you can't do a general search on just field=abc.

There was a good thread in here about how to do the search you are talking about, I'll try and hunt it down.

Cheers,

Alex