Re: Searching for Nothing
This WebDNA talk-list message is from 1998
It keeps the original formatting.
numero = 20225
interpreted = N
texte = At 14:41 Uhr 03.10.1998, Howard Wolosky wrote:>What is the method taken to search for nothing in a field of a database?>I'm trying to do it based off of a form, but when I use a modified version>of the search form created by the database helper, if they type nothing>into the field, and select not equal to for the search type, it just>doesn't work. Any ideas?Formfields get submitted as they are. So if the user does not typeanything, you get an empty value. Your searches for eqMYFIELDdata= orneMYFIELDdata= most likely do not return the right selection because inthis cases you search definitely for empty or not-empty fields.If you have just a couple of fields you can avoid the search for emptyfields within your search context:[hideif [myfield]=]&eqMYFIELDdata=[myfield][/hideif]If you deal with a lot of fields you should run through a [formvariables]loop first and set some variables based on the field values you get. Thenbuild your search string or send the user a message to complete the form.Or use the required fields technique to reject empty fields, it isdescribed in the manual.Peter__________________________________________Peter Ostry - po@ostry.com - www.ostry.comOstry & Partner - Ostry Internet SolutionsAuhofstrasse 29 A-1130 Vienna Austriafon ++43-1-8777454 fax ++43-1-8777454-21
Associated Messages, from the most recent to the oldest:
At 14:41 Uhr 03.10.1998, Howard Wolosky wrote:>What is the method taken to search for nothing in a field of a database?>I'm trying to do it based off of a form, but when I use a modified version>of the search form created by the database helper, if they type nothing>into the field, and select not equal to for the search type, it just>doesn't work. Any ideas?Formfields get submitted as they are. So if the user does not typeanything, you get an empty value. Your searches for eqMYFIELDdata= orneMYFIELDdata= most likely do not return the right selection because inthis cases you search definitely for empty or not-empty fields.If you have just a couple of fields you can avoid the search for emptyfields within your search context:[hideif [myfield]=]&eqMYFIELDdata=[myfield][/hideif]If you deal with a lot of fields you should run through a
[formvariables]loop first and set some variables based on the field values you get. Thenbuild your search string or send the user a message to complete the form.Or use the required fields technique to reject empty fields, it isdescribed in the manual.Peter__________________________________________Peter Ostry - po@ostry.com - www.ostry.comOstry & Partner - Ostry Internet SolutionsAuhofstrasse 29 A-1130 Vienna Austriafon ++43-1-8777454 fax ++43-1-8777454-21
Peter Ostry
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
IE problems persist (2004)
Help formatting search results w/ table (1997)
Euro WebDNA Conference (2004)
[append] (1997)
[WebDNA] SOAP support (2014)
WebCat2 - storing unformatted date data? (1997)
Duplicate Carts (2000)
Answer: WebDelivery downloads alias, not original ? (1997)
[ConvertChars] problem (1997)
Re:2nd WebCatalog2 Feature Request (1996)
Hiding HTML and page breaks (1997)
Change to 5.0 per website licensing (2003)
iTools 7 for local development? (2005)
emailer (1997)
displaying New products (using [date]) (1997)
Listing Words Backwords (2001)
2.0Beta Command Ref (can't find this instruction) (1997)
SV: Send massmail (2000)
Hosts who have upgraded to v5.0? (2003)
Revisit: speed test (2002)