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:

suggestion (1997) Need help with emailer- 2 issues (1997) Re[2]: back button loses cart (2000) State Coalition Approves Internet Sales Tax Plan (2002) WebCat2b12 forgets serial # (1997) Showing unopened cart (1997) Multiple prices (1997) Can't use old cart file (was One more try) (1997) Firewalls - What's Good? (1999) emailer (1997) OS9 4.5.1 anyone (2003) The Guru Speaks (1998) No Line Breaks Appearing (2000) Problems with store (1998) HELP WITH DATES (1997) Ok here is a question? (1997) Some Questions (1997) LetterRip and WebCat & more (1998) WebCat2 - Getting to the browser's username/password data (1997) Requiring that certain fields be completed (1997)