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 type anything, you get an empty value. Your searches for eqMYFIELDdata= or neMYFIELDdata= most likely do not return the right selection because in this cases you search definitely for empty or not-empty fields.If you have just a couple of fields you can avoid the search for empty fields 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. Then build your search string or send the user a message to complete the form.Or use the required fields technique to reject empty fields, it is described in the manual. Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++43-1-8777454 fax ++43-1-8777454-21 Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching for Nothing (PCS Technical Support 1998)
  2. Re: Searching for Nothing (Martin Gertz Bech 1998)
  3. Re: Searching for Nothing (Peter Ostry 1998)
  4. Searching for Nothing (Howard Wolosky 1998)
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 type anything, you get an empty value. Your searches for eqMYFIELDdata= or neMYFIELDdata= most likely do not return the right selection because in this cases you search definitely for empty or not-empty fields.If you have just a couple of fields you can avoid the search for empty fields 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. Then build your search string or send the user a message to complete the form.Or use the required fields technique to reject empty fields, it is described in the manual. Peter__________________________________________ Peter Ostry - po@ostry.com - www.ostry.com Ostry & Partner - Ostry Internet Solutions Auhofstrasse 29 A-1130 Vienna Austria fon ++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:

WebDNA maxing out processor (2008) Snake Bites (1997) [WebDNA] WebDNA on PowerPC Leopard Server (2009) U&P IIS concept (1998) WebCat b13 CGI -shownext- (1997) Comments in db? (1997) WebCat2 several catalogs? (1997) Can you identify the [body]? (1999) Running 2 two WebCatalog.acgi's (1996) Re:quit command on NT (1997) WebTen? (1997) Error 551 in Emailer (2000) [Shell] not relative (2000) Banners (1997) Still Stumped on ShowNext...HELP! (1997) Huge databases and RAM (1998) Repeating Fields (1997) pacific-coast or starnine? (1998) command line in webDNA 5?! (2003) Not really WebCat- (1997)