Jump to content

Recommended Posts

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

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
[code]
purchase_order          order_item
--------------          -------------
purch_id   <----------> purch_id
cust_id                 stock_id
order_date              quantity[/code]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.