setting up pseudo tables in mysql shopping cartby coldfingertips (Pilgrim)
|on Nov 28, 2005 at 19:26 UTC||Need Help??|
coldfingertips has asked for the wisdom of the Perl Monks concerning the following question:
I am still new with MySQL and seek advice from the monks of PM.
I am creating a mini shopping cart and I need some help to make sure I am getting the tables correct. There are 4 tables.
I have one table for all the products. One temp table which puts their CURRENT order into while they are surfing the site. The order table pulls the information out of the temp table once the order was verified via PayPal's IPN. The temporder table I have no idea what to do with.
I am lost as to how to add all the user's products and qty's to a table without making a new table for each person. That seems very, very costly but I don't know any other way to do it. I need the current items and quantities in both the temporder and the order table (or somehow related so I can pull it back later).
I could in reality make an order table and make duplicate USERID rows and have items/quantities that way and just search for rows that have the USERID in question. This means more reasonable than a new table but depending on the database size, could be costly as well.
Does anyone know of a simple way to add their items/qty's to the table(s)?