Re: practicing safe queries..

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 31510
interpreted = N
texte = It could be argued that WebCat should throw an error if a query term was malformed, instead of silently ignoring it. It would be very bad, IMHO, if it silently corrected (i.e. eq and datarq), since that would promote lazy coding and open the door to very difficult bugs. I wouldn't mind if WebCat refused to process any tag with malformed parameters, since that would make most typos glaringly obvious, rather than having to refer based on the existing behavior.Now if WebCat had a debug mode...John PeacockMichael Winston wrote: > > > >Now because I managed to type SKU instead of eqSKUdatarq, that part > >>of the query is ignored and everything that is TYPE=ARCHIVE gets it's > >>STATUS set to CARROT.. Shouldn't the query fail instead so you don't > >>hose your entire DB? > > > >No way! > > > >Just because you failed to use the proper webdna syntax and screwed > >up your database is no reason for webcat to have its default behavior > >changed. WebCat is properly using every valid parameter you gave it, > >exactly like it should -- and just like it always has. It should be > >a simple task for you to fix your webdna code, them manually replace > >your ruined db file with your backup copy. > > > > Just like it always has isn't necessarily the best reason to keep > something the way it is. And it may be a simple task to fix the > error, but wouldn't it be better if WebCat didn't let the error occur > in the first place? > > If someone mistypes &SKU=5 instead of eqSKUdatarq=5 then, yeah, > it would be kind of nice for WebCat to analyze the mistyped term and > fill in the blanks so that the least amount of damage is done (adding > eq and datarq is pretty strict limiting, but there may be other, > better ways.) > > And this change, if implemented, wouldn't be breaking any sites. > After all, it's a coding error that just gets thrown out. No one has > designed their sites around the behavior of terms like &sku=5. I > mean, maybe someone has, but since it currently doesn't do anything > it would be a pretty strange design choice. > > A collateral issue is when webcat throws out terms like > &eqSKUdatarq=. Yes, I know you should use eqSKUdatarq=[BLANK], > but what if you're using a variable instead (e.g. > eqSKUdatarq=[VAR1]). If VAR1 happens to be blank, the entire term > get thrown out. Mad mojo. > > Michael > > ############################################################# > 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 > To switch to the INDEX mode, E-mail to > Send administrative queries to ############################################################# 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 To switch to the INDEX mode, E-mail to Send administrative queries to Associated Messages, from the most recent to the oldest:

    
  1. Re: practicing safe queries.. (Thomas Wedderburn-Bisshop 2000)
  2. Re: practicing safe queries.. (Thomas Wedderburn-Bisshop 2000)
  3. Re: practicing safe queries.. (Jereme Claussen 2000)
  4. Re: practicing safe queries.. (Michael Winston 2000)
  5. Re: practicing safe queries.. (Jereme Claussen 2000)
  6. Re: practicing safe queries.. (John Butler 2000)
  7. Re: practicing safe queries.. (Kenneth Grome 2000)
  8. Re: practicing safe queries.. (Jereme Claussen 2000)
  9. Re: practicing safe queries.. (John Peacock 2000)
  10. Re: practicing safe queries.. (Jereme Claussen 2000)
  11. Re: practicing safe queries.. (Michael Winston 2000)
  12. Re: practicing safe queries.. (Kenneth Grome 2000)
  13. practicing safe queries.. (Jereme Claussen 2000)
It could be argued that WebCat should throw an error if a query term was malformed, instead of silently ignoring it. It would be very bad, IMHO, if it silently corrected (i.e. eq and datarq), since that would promote lazy coding and open the door to very difficult bugs. I wouldn't mind if WebCat refused to process any tag with malformed parameters, since that would make most typos glaringly obvious, rather than having to refer based on the existing behavior.Now if WebCat had a debug mode...John PeacockMichael Winston wrote: > > > >Now because I managed to type SKU instead of eqSKUdatarq, that part > >>of the query is ignored and everything that is TYPE=ARCHIVE gets it's > >>STATUS set to CARROT.. Shouldn't the query fail instead so you don't > >>hose your entire DB? > > > >No way! > > > >Just because you failed to use the proper webdna syntax and screwed > >up your database is no reason for webcat to have its default behavior > >changed. WebCat is properly using every valid parameter you gave it, > >exactly like it should -- and just like it always has. It should be > >a simple task for you to fix your webdna code, them manually replace > >your ruined db file with your backup copy. > > > > Just like it always has isn't necessarily the best reason to keep > something the way it is. And it may be a simple task to fix the > error, but wouldn't it be better if WebCat didn't let the error occur > in the first place? > > If someone mistypes &SKU=5 instead of eqSKUdatarq=5 then, yeah, > it would be kind of nice for WebCat to analyze the mistyped term and > fill in the blanks so that the least amount of damage is done (adding > eq and datarq is pretty strict limiting, but there may be other, > better ways.) > > And this change, if implemented, wouldn't be breaking any sites. > After all, it's a coding error that just gets thrown out. No one has > designed their sites around the behavior of terms like &sku=5. I > mean, maybe someone has, but since it currently doesn't do anything > it would be a pretty strange design choice. > > A collateral issue is when webcat throws out terms like > &eqSKUdatarq=. Yes, I know you should use eqSKUdatarq=[BLANK], > but what if you're using a variable instead (e.g. > eqSKUdatarq=[VAR1]). If VAR1 happens to be blank, the entire term > get thrown out. Mad mojo. > > Michael > > ############################################################# > 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 > To switch to the INDEX mode, E-mail to > Send administrative queries to ############################################################# 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 To switch to the INDEX mode, E-mail to Send administrative queries to John Peacock

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:

Template - Inventory (2000) File Maker Pro Value List Field Export Proplem... (2000) [Sum] function? (1997) [SEARCH] Context for SKU prices not working... (1998) FAX solutions? (2001) MyVitrualMerchant (2007) Share cost of training videos! (1998) Fishing: anyone on this group willing to do support? (1998) Re:WebCatalog f2 Installation (1997) [Lookup] on secure page not returning anything (2000) Emailer (1997) Installation webCatalog (French speakers please help) (1998) [isfile] ? (1997) flushing databases (2003) Fields/Forms Processing (1998) Processing stops (2006) HomePage Caution (1997) [WAY OFF TOPIC] anybody live in Kansas? (2003) Buying sans cart (1997) convertWords... (2001)