Re: Multithreading of [replace]
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 23112
interpreted = N
texte = >>Now that I've made all these comments, I have an even faster solution. The>>fact of the matter is that you don't need the search context at all.>>Therefore I would get rid of it completely. You can perform the same tasks>>shown above with a single replace and a single lookup, like this:>>>>[replace>>append=t&db=carts.db&eqCARTdata=[cart]&allcase=t]cart=[cart]&date=[date>>%Y/%m/%d]&firstpage=[lookup>>db=carts.db&value=[cart]&lookinfield=cart&returnfield=firstpage¬found=[thisu>>r>>l]] ]&lastpage=[thisurl][/replace]>>If I really, really had to stick with the original db solution I would>split that db into 10 different ones and store visitor 1 in db 1, visitor 2>in db 2 and so on. The info of which db a visitor belongs to I would pass>in the URI.Good idea! An easy way to select which cart.db to use (cart0.db, cart1.db, cart2.db ... cart9.db) would be to grab the last digit of the cart value and use the db with that digit in its name, like this:[replace db=cart[getchars start=1&end=1&from=end][cart][/getchars].db& ...Of course, this assumes the visitor carries the cart value throughout his entire visit ... :)Sincerely,Ken Grome
Associated Messages, from the most recent to the oldest:
>>Now that I've made all these comments, I have an even faster solution. The>>fact of the matter is that you don't need the search context at all.>>Therefore I would get rid of it completely. You can perform the same tasks>>shown above with a single replace and a single lookup, like this:>>>>[replace>>append=t&db=carts.db&eqCARTdata=
[cart]&allcase=t]cart=
[cart]&date=[date>>%Y/%m/%d]&firstpage=[lookup>>db=carts.db&value=
[cart]&lookinfield=cart&returnfield=firstpage¬found=[thisu>>r>>l]] ]&lastpage=
[thisurl][/replace]>>If I really, really had to stick with the original db solution I would>split that db into 10 different ones and store visitor 1 in db 1, visitor 2>in db 2 and so on. The info of which db a visitor belongs to I would pass>in the URI.Good idea! An easy way to select which cart.db to use (cart0.db, cart1.db, cart2.db ... cart9.db) would be to grab the last digit of the cart value and use the db with that digit in its name, like this:[replace db=cart[getchars start=1&end=1&from=end]
[cart][/getchars].db& ...Of course, this assumes the visitor carries the cart value throughout his entire visit ... :)Sincerely,Ken Grome
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:
Re2: frames & carts (1997)
Okay, I give up... (1999)
Surprise x and y post args (1998)
[switch] platform specific bug??? (2003)
different show next (1997)
Database Helper missing? (2000)
attachment (2000)
New random discoveries? (2005)
WebCat2 - Getting to the browser's username/password data (1997)
How to add product size choices to form? (1997)
Forms Search Questions (1997)
WebDNA FAQ or FAQs -- was "weird problem" (2004)
[ListWords] BUG? (2003)
PIXO support (1997)
Dates! (1998)
Setting up WebCatalog with Retail Pro data (1996)
OT: How to get more traffic to a site? (2005)
[protect] (2000)
SiteEdit NewFile.html ? (1997)
Forms Search Questions (1997)