Criteria with Database Results Wizard

S

Steve

I'm having a problem choosing the criteria for the
Database Results Wizard. I have 5 fields for the
criteria (such as address, city, state, zip and area
code). I want visitors to be able to restrict their
searches. I have no problem if they enter data in one
field (like zip).

But I'm having trouble if a person wants to enter data in
more than one field (for example, they want to restrict
their search by entering the state, then further
restricting their search by area code). I'm not sure how
to set up the criteria in the Database Results Wizard
with the and/or. If I do "and" for all of the fields,
then the visitor has to enter data in all fields. If I
enter "or" for all the fields, then it is not necessarily
restricting it. What am I doing wrong?

Also, does anyone know with drop-down lists in the
Database Results Wizard how I can format the field so
that the default is no value? I've tried adding an
option to the drop-down list with a blank entry, but it
won't allow it.

Thanks,
Steve
 
M

MD WebsUnlimited.com

Hi Steve,

Think in the positive.

Select * where field1 like ::Field1:: and field2 like ::Field2:: and Field3
like ::Field3::

You DD is then

<select name="Field1" >
<option value="*" >Any</option>
.....
<option value="xxxy"> xxxy</option>

For other fields set the initial value to

<input type="text" value="*" >

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top