Re: lazy programming

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 33818
interpreted = N
texte = >> You have to use the parameters in the replace tag to identify and >> retrieve only those records you need to replace, which means the >> category=Clothing&subcategory= belongs in the replace tag along >> with the blah=blah parameters, not inside the replace context. And >> of course this snippet of code has to be changed so it appears in the >> proper syntax, which means it has to look more like this: >> eqcategorydatarq=Clothing&eqsubcategorydatarq=[blank] > >hehe Right! this was lazy webcat list posting on my part :) >the actual replace context is: >[replace db=catalog.db&eqskudatarq=[sku]] >then the category is being generated with a formvariables, and so there will >always be a category=[value] inside the replace context. But I want to add >one at the end that in effect overides the one in the formvariables if it >exists. so the result inside the replace looks like [replace >db=catalog.db&eqskudatarq=[sku]]category=origvalue&category=newvalue[/replac >e] and I don't understand why it's not just replacing it twice cus it seems >like it shouldWebCat will never replace a field value twice because it only sees the *first* occurrence of the category value. If you want to replace the existing value with the non-formvariable value, you have to put that value FIRST, not second. ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: lazy programming (Kenneth Grome 2000)
  2. Re: lazy programming (Aaron Lynch 2000)
  3. Re: lazy programming (Kenneth Grome 2000)
  4. lazy programming (Aaron Lynch 2000)
>> You have to use the parameters in the replace tag to identify and >> retrieve only those records you need to replace, which means the >> category=Clothing&subcategory= belongs in the replace tag along >> with the blah=blah parameters, not inside the replace context. And >> of course this snippet of code has to be changed so it appears in the >> proper syntax, which means it has to look more like this: >> eqcategorydatarq=Clothing&eqsubcategorydatarq=[blank] > >hehe Right! this was lazy webcat list posting on my part :) >the actual replace context is: >[replace db=catalog.db&eqskudatarq=[sku]] >then the category is being generated with a formvariables, and so there will >always be a category=[value] inside the replace context. But I want to add >one at the end that in effect overides the one in the formvariables if it >exists. so the result inside the replace looks like [replace >db=catalog.db&eqskudatarq=[sku]]category=origvalue&category=newvalue[/replac >e] and I don't understand why it's not just replacing it twice cus it seems >like it shouldWebCat will never replace a field value twice because it only sees the *first* occurrence of the category value. If you want to replace the existing value with the non-formvariable value, you have to put that value FIRST, not second. ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- 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://search.smithmicro.com/ Kenneth Grome

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:

Assigning new CART number (1997) Showif, Hideif reverse logic ? (1997) Problem with summary on date / inconsequent webcat behaviour (1998) [WebDNA] Best of breed eCommerce and CMS/Sitebuilder templates (2010) EmailFolder Correct Permissions ? (2003) [WebDNA] how can i grab the contents of a post? (2011) Caching pages...again (2001) Field value disappearing problem (2003) includes and cart numbers (1997) Softball questions (2003) Updating a database once per day - An example (1998) Associative lookup style? (1997) triggers.db (1999) Frames and WebCat (1997) WebCatalog Technical Reference (1997) [Announce]: Web server security and password protection (1997) upgrade? (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through (1997) faxing orders (2000) Generating Report Totals (1997)