populating a table from multiple cookies

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62017
interpreted = N
texte = Hello, Trying to do a 'last xx items viewed' on a sidebar on my site. I want to sort them in proper order based on which was viewed most recently. To this end, I am setting 5 cookies named LastView1 through LastView5. I then want to store the contents of the cookies in a table. The cookies have multiple values seperated by a pipe | hence the listwords below. The code below works, but I am thinking the code is overly complex for what I am doing. This is my first time using tables so I may be mising something obvious as to adding multiple rows of data. Haven't tried it yet, but would moving the table open/close to be outside of the loop do the trick (instead of having the multiple rows of the field data and dropping the extra [index] from the beginning of the field)? Is this something that would benefit from being put into a function (haven't used those yet either)? ---- begin ---- [loop start=1&end=5] [math]row=[index][/math] [ListWords Words=[getcookie name=[interpret]LastViewed[index][/interpret]]&Delimiters=|][text show=f][row]field[index]=[word][/text][/ListWords] [table name=Viewed&fields=profileID,nickname,city,state,country,stamp] [hideif [1field1]= ][1field1][1field2][1field3][1field4][1field5][1field6][/hideif] [hideif [2field1]= ][2field1][2field2][2field3][2field4][2field5][2field6][/hideif] [hideif [3field1]= ][3field1][3field2][3field3][3field4][3field5][3field6][/hideif] [hideif [4field1]= ][4field1][4field2][4field3][4field4][4field5][4field6][/hideif] [hideif [5field1]= ][5field1][5field2][5field3][5field4][5field5][5field6][/hideif] [/table][/loop] Last viewed
[search table=Viewed&neProfileIDdata=[blank]&STAMPsort=1&STAMPsdir=as] [founditems] [nickname]
[city], [hideif [state]=][state], [/hideif][country]
[/founditems] [/search] ---- end ---- Thanks Dale ------------------------------------------------------------- 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: populating a table from multiple cookies ( Terry Wilson 2005)
  2. populating a table from multiple cookies ( "my eLists" 2005)
Hello, Trying to do a 'last xx items viewed' on a sidebar on my site. I want to sort them in proper order based on which was viewed most recently. To this end, I am setting 5 cookies named LastView1 through LastView5. I then want to store the contents of the cookies in a table. The cookies have multiple values seperated by a pipe | hence the listwords below. The code below works, but I am thinking the code is overly complex for what I am doing. This is my first time using tables so I may be mising something obvious as to adding multiple rows of data. Haven't tried it yet, but would moving the table open/close to be outside of the loop do the trick (instead of having the multiple rows of the field data and dropping the extra [index] from the beginning of the field)? Is this something that would benefit from being put into a function (haven't used those yet either)? ---- begin ---- [loop start=1&end=5] [math]row=[index][/math] [ListWords Words=[getcookie name=[interpret]LastViewed[index][/interpret]]&Delimiters=|][text show=f][row]field[index]=[word][/text][/ListWords] [table name=Viewed&fields=profileID,nickname,city,state,country,stamp] [hideif [1field1]= ][1field1][1field2][1field3][1field4][1field5][1field6][/hideif] [hideif [2field1]= ][2field1][2field2][2field3][2field4][2field5][2field6][/hideif] [hideif [3field1]= ][3field1][3field2][3field3][3field4][3field5][3field6][/hideif] [hideif [4field1]= ][4field1][4field2][4field3][4field4][4field5][4field6][/hideif] [hideif [5field1]= ][5field1][5field2][5field3][5field4][5field5][5field6][/hideif] [/table][/loop] Last viewed
[search table=Viewed&neProfileIDdata=[blank]&STAMPsort=1&STAMPsdir=as] [founditems] [nickname]
[city], [hideif [state]=][state], [/hideif][country]
[/founditems] [/search] ---- end ---- Thanks Dale ------------------------------------------------------------- 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/ "my eLists"

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:

PSC recommends what date format yr 2000??? (1997) forming a SKU (1999) Word wrapping (1997) Emailer (1997) Upgrade on MacOSX 3.05 to 3.08 (2000) WebCat2b13MacPlugIn - [showif][search][/showif] (1997) Associative lookup style? (1997) searching illegal HTML (2002) Search Engines (2000) killer-format in cart (1998) New Cart No. on same page (2003) RePost: NAT and the CART (1999) WebCat2 - storing unformatted date data? (1997) Authorize.net, SIM, tcpconnect and applescript (2003) Emailer (1999) RE: completed orders database (1997) Hello??? (1997) wild question (1998) default value from Lookup (was Grant, please help me) (1997) Part Html part WebDNA (1997)