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:
Search/sort in URL Was: GuestBook example (1997)
Bit off subject -- Faxing orders (1997)
[SHOWIF] (1997)
[WebDNA] Problem with administration (2009)
Multiple Pulldowns (1997)
Html mails and Outlook Win 2000 (2001)
WebCat2b13MacPlugIn - [include] (1997)
New WebDNA Solutions ... (1997)
passing info to thankyou.tpl (1998)
Bug alert! (1997)
Thanks Grant (1997)
[lookup] speed sales pitch (2003)
Webcatalog, Webstar and Crasharama (1999)
Help name our technology! (1997)
Cyberstudio and WebDNA (1997)
[WebDNA] Timer (2009)
FYI: virus alert (1996)
Re:PCS Customer submissions ? (1997)
possible, WebCat2.0 and checkboxes-restated (1997)
Line items in table cells (1997)