in reply to setting up pseudo tables in mysql shopping cart
The minimal structure for a shopping cart is that the Order table holds everything that exists only once for an Order (person, shipping address, method of payment, etc), and a unique Order ID. The Order Items table holds each of the items (item ID, quantity, color, etc), as well as the ID of the order to which it belongs.
To add an item, simply insert it into the Order Items table with the proper Order ID for the current Order. To check out, select all items in the Order Items table where Order ID is your current Order ID.
You definitely don't need "a table per person"!
|Replies are listed 'Best First'.|
Re^2: settuping up pseudo tables in mysql shopping cart
by coldfingertips (Pilgrim) on Nov 28, 2005 at 19:51 UTC
by chromatic (Archbishop) on Nov 28, 2005 at 21:34 UTC