Re: I find this type=num search strange

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 48983
interpreted = N
texte = No answers for ya, but this type of info sure would be good to have posted to the new online docs for future reference :)http://webdna.smithmicro.com/ref/index.htmlGK -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Matthew A Perosi Sent: Thursday, March 27, 2003 5:04 PM To: WebDNA Talk Subject: I find this type=num search strange This is not a question, rather a posting of something I spent 2 hours on today. I thought the list would find it interesting. I'm using RedHat 7.2 with 4.5.1I'm working on a project here and I was thinking to have a database record with a SKU of Zero (0). In 4 years I never before thought of using SKU 0, but I have my crazy reasons this time.To my surprise, when using a search such as the following:[search db=admins.db&SKUsort=1&SKUtype=num&SKUsdir=as&neSKUdata=find_all]I am returned with all my records in the correctly sorted order EXCEPT sku 0.I did some digging in the archives and found out that when using type=num you need to be careful that your comparison data is actually a numerical value otherwise that comparison data will be replaced with a null value.In other words: when type=num neSKUdata=find_all is converted to: neSKUdata=I tested this several times and several different ways. I did find that you could use: neSKUdata=999999999 and it would result in returning all my records in the correctly sorted order INCLUDING sku 0.Why would WebDNA so obviously not include zero when doing a find_all search? Since we all assume that the common neSKUdata=find_all search actually returns all of our records. Perhaps SMI could change that find_all variable that is so often used in the WebMerchant with the variable find_all_but_zero. I tested this even further on other web sites I have created by adding SKU 0 products and I ended up with very bizarre results since none of my sites to date know how to handle a SKU 0 record.I'd invite comments on this one. My curiosity is peeked if any guys have ever bumped into this issue. Did SMI totally overlook this?For me this turned out to be more of a feature than a bug. I was actually looking for a way to create a hidden record. It's strange that I found a built in hidden record so quickly! :-)Matthew A Perosi Psi Prime, Inc. nj-singles.com ijo.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: I find this type=num search strange (Gary Krockover 2003)
  2. I find this type=num search strange (Matthew A Perosi 2003)
No answers for ya, but this type of info sure would be good to have posted to the new online docs for future reference :)http://webdna.smithmicro.com/ref/index.htmlGK -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Matthew A Perosi Sent: Thursday, March 27, 2003 5:04 PM To: WebDNA Talk Subject: I find this type=num search strange This is not a question, rather a posting of something I spent 2 hours on today. I thought the list would find it interesting. I'm using RedHat 7.2 with 4.5.1I'm working on a project here and I was thinking to have a database record with a SKU of Zero (0). In 4 years I never before thought of using SKU 0, but I have my crazy reasons this time.To my surprise, when using a search such as the following:[search db=admins.db&SKUsort=1&SKUtype=num&SKUsdir=as&neSKUdata=find_all]I am returned with all my records in the correctly sorted order EXCEPT sku 0.I did some digging in the archives and found out that when using type=num you need to be careful that your comparison data is actually a numerical value otherwise that comparison data will be replaced with a null value.In other words: when type=num neSKUdata=find_all is converted to: neSKUdata=I tested this several times and several different ways. I did find that you could use: neSKUdata=999999999 and it would result in returning all my records in the correctly sorted order INCLUDING sku 0.Why would WebDNA so obviously not include zero when doing a find_all search? Since we all assume that the common neSKUdata=find_all search actually returns all of our records. Perhaps SMI could change that find_all variable that is so often used in the WebMerchant with the variable find_all_but_zero. I tested this even further on other web sites I have created by adding SKU 0 products and I ended up with very bizarre results since none of my sites to date know how to handle a SKU 0 record.I'd invite comments on this one. My curiosity is peeked if any guys have ever bumped into this issue. Did SMI totally overlook this?For me this turned out to be more of a feature than a bug. I was actually looking for a way to create a hidden record. It's strange that I found a built in hidden record so quickly! :-)Matthew A Perosi Psi Prime, Inc. nj-singles.com ijo.com ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Gary Krockover

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:

Beta Documentation (1997) price on detail, but not shoppingcart (1997) Trouble with Netscape (1998) Appending current [date] to a database (1997) WC2b15 File Corruption (1997) Setting up shop (1997) PIXO support (1997) 'RequiredField' Question (1998) restart needed???? (1997) problem with dates, NT version (1997) [index] (1997) [WebDNA] MailChimp (2012) [WebDNA] 301 redirect (2016) Large founditems loops (2000) WC2f3 (1997) numfound question (2005) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Searching (second post) (1999) Country & Ship-to address & other fields ? (1997) Core Database integration (2001)