Jump to content


This topic is now archived and is closed to further replies.


How to store multiple data

Recommended Posts

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

Share this post

Link to post
Share on other sites
You need 2 tables, purchase_order and order_item

The order_item table will contain stock_id and qty for each item the customer orders
purchase_order          order_item
--------------          -------------
purch_id   <----------> purch_id
cust_id                 stock_id
order_date              quantity[/code]

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.