http://qs1969.pair.com?node_id=512346


in reply to setting up pseudo tables in mysql shopping cart

Perhaps your problem is understanding database normalization.

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"!

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.