Forum Moderators: coopster
What I want to know is what is the best way to record this to the mysql database so that the user can purchase 1 8x10, 4 4x6's etc. Would it be to make a table that is a photo order table that generates an order number and is tied to a user, then have a separate table that holds the photo type and quantity of prints and is tied to the photo order table?
The other problem is that non-registered users can also purchase photos, and those users do not have records in the user table, they simply have an e-mail address in the image table.
Thanks for any help in advance.
1)the "shipping" table would contain a unique order id(auto_incremented) for each order, as well as all required shipping information for that order, whether a registered user or otherwise.
2)the "order" table would contain all items that is in that order, which is tied to the unique id from the table "shipping"...so u can have multiple instances of the id in the order table (but not shipping) to store multiple items ordered for the same order.
...as a note to your registered user and anonymous user ordering problem, perhaps you should not store order information in the same table for these two categories...im not sure exactly why, but it seems to be better programming practices