Gossamer Forum
Home : Products : DBMan : Customization :

I want to always "Match Any"

Quote Reply
I want to always "Match Any"
In my restaurant database I give people the opportunity to search by neighborhood, and/or cuisine.

Also, they can do a search on the actual NAME of the restaurant.

If a restaurant is called Cathy's Cafe
and they just enter Cathy, the name won't come up unless they also check Match Any it won't bring it up.

Is there a way to make it a "Match Any" search everytime? Are there disadvantages to this?

Thanks in advance!

Lenny

------------------
Catalyst for the new millenium
Quote Reply
Re: I want to always "Match Any" In reply to
Try adding the following code to your search form:

Code:
<INPUT TYPE="HIDDEN" NAME="ma" VALUE="on">

Haven't tested this, but logically it should work.

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: I want to always "Match Any" In reply to
You wrote:
<<No, the Value="on" should not be in your INPUT TYPE=TEXT statement.
Also, is the "name" the exact NAME you have for the Name variable in the default.db?
>>

"Name" is the exact name of the variable (Input) in my Main Page where the search field is and it searches default.db (it is also the name of the FIELD that the restaurant name is in in default.db).

Please see:

www.bestweb.net/~cyborgny/tob/cgi-bin/dbman/main.html

and

www.bestweb.net/~cyborgny/tob/cgi-bin/dbman/default.db

for more info.
Thanks again!

Lenny
Quote Reply
Re: I want to always "Match Any" In reply to
Sorry but this doesn't seem to work.

<INPUT TYPE="HIDDEN" NAME="ma" VALUE="on">
<FONT FACE="verdana">FIND A RESTAURANT BY NAME</font>
<INPUT TYPE="TEXT" NAME="name" SIZE=25 MAXLENGTH=255 VALUE="on"> Name Search

Should I put it within the text input field? or should I in the Match Any checkbox put in "Value="on"?

I tried it both ways.

Thanks!
Quote Reply
Re: I want to always "Match Any" In reply to
No, the Value="on" should not be in your INPUT TYPE=TEXT statement.

Also, is the "name" the exact NAME you have for the Name variable in the default.db?

Please post your full form codes, so that we can help you. Also, if you could post the URL where you have the database installed, it may help us to see a visual of your project.

Smile

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us

[This message has been edited by Eliot (edited July 21, 1999).]
Quote Reply
Re: I want to always "Match Any" In reply to
Your form is NOT correctly formatted.

Here are some lines that you should edit.

Your original codes:
Code:
<form action="http://www.bestweb.net/~cyborgny/tob/cgi-bin/dbman/db.cgi" method="GET">

<input type="hidden" name="db" value="default">
<input type=hidden name="uid" value="default">
<FONT SIZE=+1 FACE="verdana, arial, helvetica">FIND A RESTAURANT BY NAME</font>
<BR>
<INPUT TYPE="HIDDEN" NAME="name" VALUE="on">
<INPUT TYPE="TEXT" NAME="name" SIZE=25 MAXLENGTH=255> Name Search <br>

Try this:

Code:
<form action="http://www.bestweb.net/~cyborgny/tob/cgi-bin/dbman/db.cgi" method="GET">

<input type="hidden" name="db" value="default">
<input type=hidden name="uid" value="default">
<INPUT TYPE="HIDDEN" NAME="ma" VALUE="on">
<FONT SIZE=+1 FACE="verdana, arial, helvetica">FIND A RESTAURANT BY NAME</font>
<BR>
<INPUT TYPE="TEXT" NAME="Name" SIZE=25 MAXLENGTH=255>Name Search <br>

Notice the bolded text.

Also, try taking out the Keyword search field in your form.

See what happens.

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us