OriginalSunny Posted April 14, 2006 Share Posted April 14, 2006 Hi,I am trying to store details of the stock for purchases made. I have got a column for the 'stockID' and the 'Quantity' in my purchases table but the problem is that a customer can buy more than one product so i don't have a clue how i am supposed to store multiple 'stockID's' for each purchase??The only other way i can think of doing this is to store the pages (or do some sort of print screen shots of pages when the products are purchased) as i am able to display them along with the 'purchaseID' on the same page. The only thing is how do i do this in php?? Is there a way to do screenshots of pages and store them so they can be viewed??Please help me as i have a deadline to do this by and i haven't got much time left!!Thanks. Link to comment https://forums.phpfreaks.com/topic/7402-how-to-store-multiple-data/ Share on other sites More sharing options...
Barand Posted April 15, 2006 Share Posted April 15, 2006 You need 2 tables, purchase_order and order_itemThe order_item table will contain stock_id and qty for each item the customer orders[code]purchase_order order_item-------------- -------------purch_id <----------> purch_idcust_id stock_idorder_date quantity[/code] Link to comment https://forums.phpfreaks.com/topic/7402-how-to-store-multiple-data/#findComment-27199 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.