Can't figure it out.... (Full Version)

All Forums >> [Web Development] >> ASP and Database



Message


Stuart at Cherry -> Can't figure it out.... (4/4/2001 23:15:00)

I've got a database and in one particular field I have 14 distinct locations of the UK. The only way to update the DB is using a form which has a dropdown list for this field, which contains (of course) those 14 distinct locations. So I can be sure that every record in the DB has, in that field, one of those 14 locations.

Now, I have done a search form which uses ASP to search on that field, using a drop down list with the 14 locations. The output is passed to the queryasp page. The code I use on that page is....

SELECT * FROM vacancy_list
WHERE Job_locator = '::Job_locator::'

This works fine. Lovely stuff. However, I also want to put an 'All regions' option on the drop down list. So that anyone could search on one of those particular 14 regions, but could also choose to select to search the whole database if they so wished. I thought I would be able to change the 'value' in the drop down menu properties from 'All regions' to a * symbol.

However, this causes a 'no records returned' message.

Anyone got any advice?

Thanks in anticipation..

------------------
***born to be wild***





Spooky -> RE: Can't figure it out.... (4/4/2001 13:25:00)

Change the query to a "contains" (like) query, and use the wildcard value "%" as the listbox "all" value to return all records

------------------
Spooky
"I am Spooky of Borg. Prepare to be assimilated, babycakes!"
Subscribe to OutFront News
Database / DRW Q & A
The Spooky Login!





Stuart at Cherry -> RE: Can't figure it out.... (4/5/2001 20:36:00)

Thanks Spooky. That's spot on!




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625