Re: SKU Question

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 24365
interpreted = N
texte = *This message was transferred with a trial version of CommuniGate(tm) Pro* I always generate new skus on the same page as the [replace] (or [append]). Something like:[math show=f]thesku=[search db=products&neSKUdatarq&deSKUsort=1&SKUtype=num&max=1]0+[founditems][sku]+[/ founditems]1[/search][/math] [append db=products]sku=[thesku]...[/append]Note that this assumes all skus are numbers. This technique can be modified to first see if there is an incoming variable [thesku] and only create a new one if there isn't.John.At 10:36 AM 11/14/99 -0600, you wrote: >Aaron, >Thanks for your explanation it is very clear and a very good solution, >but what happens if two different users are adding items at the same >time, I mean, when a user are filling the data of the item and before he >go to the second page other user fill faster his data, both have the same >newsku value, one of them will replace the data of the other. > >Are there a way to do the search and give the value of the newsku in the >second page? >How can I create a variable like newsku without a form? > >Thanks again for you help. >Rodolfo de la Garza > >The 11/14/99 1:59 AM Aaron Lynch aaron@DigitalSpeed.com Wrote > >>on page 1 >>>db=mydatabase.db&neskudata=bogus&deskusort=1&skutype=numm&max=1][founditem >>s][math][sku]+1[/math][/founditems][/search]> >> >>on page 2 >> >>[replace >>db=mydatabase.db&eqskudata=[newsku]&append=t]sku=[newsku]&yourdata=[someva >>riable][/replace] >> >> >> >>ok, to summerize, you search the database to find all items whose sku data >>does Not Equal' >>Bogus so we're going to find every record, right? ok, then 'DEscending >>sku sort' so the >>highest sku will show first. then skutype = number, so that it knows to >>sort numerically, >>and not alphabetically, and then max=1, because of all those sku's we just >>found, we're >>only interested in the first one, the highest one. >> >>then it's simple math, the highest sku in the db +1 gets you a new sku. >> >>say, for example you have a new db, the number found in the result will be >>nothing, plus >>one. so newsku=1. >> >>then on page two we replace the record with sku 1, normally, replace won't >>do that, >>because sku 1 doesn't exist, which is why we put append=t in there. so >>replace 1 and if >>it's not there append it. >> >>if the user reloads at this point, record 1 is replaced. but the sku is >>not incremented. >> >>this is all in the docs but kinda hard to grasp, >> >> >>HTH >>-Aaron >> >>Rodolfo de la Garza wrote: >> >>> I tried what Jesse recommend using it this way: >>> >>> [search db=mydatabase.db&eqSKUdata=[sku]][founditems][showif >>> [numFound]=0] [append] >>> [/showif][/founditems] >>> >>> If it is the first time I use this SKU, I suppose that [numFound] will be >>> 0 but it doesn't append it, I don't know why. >>> >>> Am I doing somethig wrong? >>> >>> On the other hand, Howard said: >>> >>> you could generate the SKU on the same form >>> where they enter the rest of the info, and on the submitted page,. Then, >>> if they go back and submit again, the record >>> will not be added because the replace will already see a record with that >>> sku, so it will replace it, otherwise if it doesn't aleady exist, it will >>> add it. >>> >>> I don't understand, what does use a replace with append=t means. >>> I'm just learning. >>> >>> Ken said: >>> use an append context and put the code that creates your SKU inside the >>> context instead of in the form >>> >>> I'm using the append context and I can do it. It is true the SKU will be >>> not duplcated (Good Idea) but the item will be duplicated with different >>> SKU. >>> >>> Are there a way to prevent this? >>> >>> Thanks for your support. >>> >>> Rodolfo de la Garza >>> >>> The 11/13/99 12:47 PM Jesse Williams Proudman lists@ninewire.com wrote >>> >>> >On the page that appends it, check to see if the sku is in use with a >>> >search. >>> > >>> >Jesse Williams Proudman - NineWire Production >>> > http://www.ninewire.com <-> Jesse@ninewire.com >>> > Innovative and Creative Web Design and Hosting >>> > >>> >> -----Original Message----- >>> >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >>> >> Behalf Of Rodolfo de la Garza >>> >> Sent: Saturday, November 13, 1999 10:47 AM >>> >> To: WebCatalog Talk >>> >> Subject: SKU Question >>> >> >>> >> >>> >> Hi there, >>> >> >>> >> How can I prevent SKU to be duplicated by error? >>> >> If the user click the back button and submit again the item the SKU >will >>> >> be duplicated. >>> >> >>> >> Any Idea? >>> >> >>> >> Thanks. >>> >> >>> >> >>> >> ------------------------------------------------------------- >>> >> Brought to you by CommuniGate Pro - The Buzz Word Compliant >>> >> Messaging Server. >>> >> To end your Mail problems go 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 >>> >> >>> >> >>> > >>> > >>> >------------------------------------------------------------- >>> >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >>> Server. >>> >To end your Mail problems go 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 >>> > >>> >>> ------------------------------------------------------------- >>> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >Server. >>> To end your Mail problems go 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 >> >> >> >>------------------------------------------------------------- >>Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >Server. >>To end your Mail problems go 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 >> > > >------------------------------------------------------------- >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >To end your Mail problems go 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 >John Hill ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: SKU Question (Aaron Lynch 1999)
  2. Re: SKU Question (Jesse Williams Proudman 1999)
  3. Re: SKU Question (J. A. Hill 1999)
  4. Re: SKU Question (Rodolfo de la Garza 1999)
  5. Re: SKU Question (Aaron Lynch 1999)
  6. Re: SKU Question (Rodolfo de la Garza 1999)
  7. Re: SKU Question (Kenneth Grome 1999)
  8. Re: SKU Question (Howard Wolosky 1999)
  9. Re: SKU Question (Jesse Williams Proudman 1999)
  10. SKU Question (Rodolfo de la Garza 1999)
*This message was transferred with a trial version of CommuniGate(tm) Pro* I always generate new skus on the same page as the [replace] (or [append]). Something like:[math show=f]thesku=[search db=products&neSKUdatarq&deSKUsort=1&SKUtype=num&max=1]0+[founditems][sku]+[/ founditems]1[/search][/math] [append db=products]sku=[thesku]...[/append]Note that this assumes all skus are numbers. This technique can be modified to first see if there is an incoming variable [thesku] and only create a new one if there isn't.John.At 10:36 AM 11/14/99 -0600, you wrote: >Aaron, >Thanks for your explanation it is very clear and a very good solution, >but what happens if two different users are adding items at the same >time, I mean, when a user are filling the data of the item and before he >go to the second page other user fill faster his data, both have the same >newsku value, one of them will replace the data of the other. > >Are there a way to do the search and give the value of the newsku in the >second page? >How can I create a variable like newsku without a form? > >Thanks again for you help. >Rodolfo de la Garza > >The 11/14/99 1:59 AM Aaron Lynch aaron@DigitalSpeed.com Wrote > >>on page 1 >>>db=mydatabase.db&neskudata=bogus&deskusort=1&skutype=numm&max=1][founditem >>s][math][sku]+1[/math][/founditems][/search]> >> >>on page 2 >> >>[replace >>db=mydatabase.db&eqskudata=[newsku]&append=t]sku=[newsku]&yourdata=[someva >>riable][/replace] >> >> >> >>ok, to summerize, you search the database to find all items whose sku data >>does Not Equal' >>Bogus so we're going to find every record, right? ok, then 'DEscending >>sku sort' so the >>highest sku will show first. then skutype = number, so that it knows to >>sort numerically, >>and not alphabetically, and then max=1, because of all those sku's we just >>found, we're >>only interested in the first one, the highest one. >> >>then it's simple math, the highest sku in the db +1 gets you a new sku. >> >>say, for example you have a new db, the number found in the result will be >>nothing, plus >>one. so newsku=1. >> >>then on page two we replace the record with sku 1, normally, replace won't >>do that, >>because sku 1 doesn't exist, which is why we put append=t in there. so >>replace 1 and if >>it's not there append it. >> >>if the user reloads at this point, record 1 is replaced. but the sku is >>not incremented. >> >>this is all in the docs but kinda hard to grasp, >> >> >>HTH >>-Aaron >> >>Rodolfo de la Garza wrote: >> >>> I tried what Jesse recommend using it this way: >>> >>> [search db=mydatabase.db&eqSKUdata=[sku]][founditems][showif >>> [numFound]=0] [append] >>> [/showif][/founditems] >>> >>> If it is the first time I use this SKU, I suppose that [numFound] will be >>> 0 but it doesn't append it, I don't know why. >>> >>> Am I doing somethig wrong? >>> >>> On the other hand, Howard said: >>> >>> you could generate the SKU on the same form >>> where they enter the rest of the info, and on the submitted page,. Then, >>> if they go back and submit again, the record >>> will not be added because the replace will already see a record with that >>> sku, so it will replace it, otherwise if it doesn't aleady exist, it will >>> add it. >>> >>> I don't understand, what does use a replace with append=t means. >>> I'm just learning. >>> >>> Ken said: >>> use an append context and put the code that creates your SKU inside the >>> context instead of in the form >>> >>> I'm using the append context and I can do it. It is true the SKU will be >>> not duplcated (Good Idea) but the item will be duplicated with different >>> SKU. >>> >>> Are there a way to prevent this? >>> >>> Thanks for your support. >>> >>> Rodolfo de la Garza >>> >>> The 11/13/99 12:47 PM Jesse Williams Proudman lists@ninewire.com wrote >>> >>> >On the page that appends it, check to see if the sku is in use with a >>> >search. >>> > >>> >Jesse Williams Proudman - NineWire Production >>> > http://www.ninewire.com <-> Jesse@ninewire.com >>> > Innovative and Creative Web Design and Hosting >>> > >>> >> -----Original Message----- >>> >> From: WebCatalog Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On >>> >> Behalf Of Rodolfo de la Garza >>> >> Sent: Saturday, November 13, 1999 10:47 AM >>> >> To: WebCatalog Talk >>> >> Subject: SKU Question >>> >> >>> >> >>> >> Hi there, >>> >> >>> >> How can I prevent SKU to be duplicated by error? >>> >> If the user click the back button and submit again the item the SKU >will >>> >> be duplicated. >>> >> >>> >> Any Idea? >>> >> >>> >> Thanks. >>> >> >>> >> >>> >> ------------------------------------------------------------- >>> >> Brought to you by CommuniGate Pro - The Buzz Word Compliant >>> >> Messaging Server. >>> >> To end your Mail problems go 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 >>> >> >>> >> >>> > >>> > >>> >------------------------------------------------------------- >>> >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >>> Server. >>> >To end your Mail problems go 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 >>> > >>> >>> ------------------------------------------------------------- >>> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >Server. >>> To end your Mail problems go 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 >> >> >> >>------------------------------------------------------------- >>Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging >Server. >>To end your Mail problems go 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 >> > > >------------------------------------------------------------- >Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. >To end your Mail problems go 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 >John Hill ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go 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 J. A. Hill

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:

Cart sweeper (2000) international time (1997) Error Messages Returned to User (1997) can WC render sites out? (1997) tax rate off by 1 cent (1997) [writefile] (1997) Using Plug-In while running 1.6.1 (1997) ImageMap (1997) Spaces in sendmail (1998) OT: How to get more traffic to a site? (2005) Problem during evaluation of WebCatalog (1998) [WebDNA] Exclude found items in a 2nd search (2016) Emailer setup (1997) WebCat B13 Mac CGI -- Frames question (1997) This message couldn't reach the list! (multi-column (1998) [taxrate] question (1997) [WebDNA] MD5 encryption (2011) I've been thinking (2002) Possible Bug in 2.0b15.acgi (1997) Requiring that certain fields be completed (1997)