I would use an associated array, or better known in the cf world as a
structured array. For example

lastReviewed[Count].productId = productId

So if an item is reviewed then just add the structure to the end of the
array, then you can either use a reverse length of array down to zero to
display the information. This method would also allow for the data not to be
stored into the DB.

If you need it to persist across a user session, then you can just create a
table with the userID, productId and or date/time. Depending on the
cicrumstances, the incrementation of the autoid would be sufficent to do a
query with a sort desc on the table index id. Or via the date and time,
eitherway I do not believe you have allowed yourself enough time to
investiage the problem.




On Wed, Nov 26, 2008 at 10:47 PM, K Simanonok <[EMAIL PROTECTED]> wrote:

> >Reverse will reverse the whole string, not order of the list.
> >
> >Do something like this:
> ><cfloop index="i" from="#ListLen(Cookie.LastVisited)#" to="1" step="-1">
> >     <cfset CurId = ListGetAt(Cookie.LastVisited,i)/>
> >     <!--- TODO: lookup/output product details. --->
> ></cfloop>
>
> Thank you, that is a very good suggestion but it is not the nut of the
> problem because I am not even there yet.  The bigger obstacle is getting
> either a Structure or Array to actually work.  What makes sense, is logical,
> and follows the examples in the documentation only generates error messages.
>  How can I get the data from the query into a form where I can address them
> by the actual ProductID in the COOKIE.RECENTLYVIEWED?
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315954
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to