positutely absotively

----- Original Message -----
From: "Douglas Brown" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 11:37 AM
Subject: Do I need to lock this?


> I was wondering if I need to lock this, I have locking enabled in my
> application.cfm for sessions?
>
> <CFSCRIPT>
>
>     if (not(isDefined("session.cart"))){
>      session.cart = structNew();
>          }
>          // The item structure we will define is as follows
>          // 1. sysModelNum
>          // 2. qty
>
>
>                     tempValue = listToArray('#attributes.ID#,
>             #attributes.sysModelNum#,
>             #attributes.price#,
>             #attributes.qty#,
>             #attributes.cse#,
>             #attributes.cpu#,
>             #attributes.ram#,
>             #attributes.hdd#,
>             #attributes.sec_hdd#,
>             #attributes.mtr#,
>             #attributes.ctr#,
>             #attributes.vid#,
>             #attributes.snd#,
>             #attributes.cdr#,
>             #attributes.dvd#,
>             #attributes.crw#,
>             #attributes.mdm#,
>             #attributes.stg#,
>             #attributes.spk#,
>             #attributes.nic#,
>             #attributes.clng#,
>             #attributes.os#,
>             #attributes.war#');
>
>          // Check to make sure that the item is in the cart, and if it
> is not, add it.
>                    if
> (not(structKeyExists(session.cart,attributes.ID))) {
>
> structInsert(session.cart,attributes.ID,tempValue,true);
>                    }
> else {
> // If the item is already in the cart update the quantity
>
> tempvalue[4]=attributes.qty;
> structUpdate(session.cart,attributes.ID,tempvalue);
> }
>
> </CFSCRIPT>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to