[thelist] Homemade Shopping Cart Question

Rob Smith rob.smith at THERMON.com
Mon Nov 24 13:46:59 CST 2003


Hi,

When a user "Adds an Item to their cart," you want to reserve that item and
take it off the shelf so that no one else can put it in their cart. Each
item is unique. To accomplish this feet, I have created a separate table
(basket) that will hold their items to their customer id. 

My question is that when they return to browse other items, how can you hide
the items that were stored in this temporary table. You'd think it would be
as easy as:

SELECT DISTINCT p.ProductID, p.Product, p.ProductDesc FROM Products p,
Orders o Where p.ProductID <> o.ProductID
'When the user adds an item, the products ID is stored in Orders. So if the
item is in the orders table, don't show it with the rest of the bunch.

You thoughts on hiding items in temporary tables?,

Rob Smith


More information about the thelist mailing list