Forums

This topic is locked

this newbie has a question...

Posted 26 Apr 2001 00:07:13
1
has voted
26 Apr 2001 00:07:13 flip top posted:
I ran through the UltraDev tutorial that comes with the install (called Compass Internet).

There's an advanced search page that has a Name (text box) field and a Department (drop-menu) field. If I leave the name blank and choose a department, I get 0 results. If I use a % for the name, then choose a department, I get every match for that department.

My question is: Is it possible to be able to leave the name field blank and still get a result?

The Record query for the ResultAdv.asp page uses a SQL line to "stuff" the values from the search page into the results page. The default value for the name is % but it's not passing it to the results query and I'm getting nothing. I only get something if I manual type % into the name field on the search page. Any way to do this?

Any help would be awesome. thanks

Replies

Replied 26 Apr 2001 13:58:55
26 Apr 2001 13:58:55 Waldo Smeets replied:
When you type % this means that the search engine has got to look for ALL possible values for name.

It's most likely that you use a SQL query like "SELECT col1, col2 FROM tableName WHERE condA AND condB"

Be aware of the AND statement. Change this to OR and I think that you then have the results you are looking for.

I suggest that you also have a look at these tutorials:
www.macromedia.com/support/ultradev/building/simple_search_feature/
www.macromedia.com/support/ultradev/building/multiple_param_search

Good luck!

Waldo Smeets - www.UDzone.com Webmaster
------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
------------------------------------------
Replied 26 Apr 2001 21:09:22
26 Apr 2001 21:09:22 flip top replied:
Thank you very much for the information and the links! I'll check them out.

fliptop7

Reply to this topic