Note that there are some explanatory texts on larger screens.

plurals
  1. POSetup of database for ordersheet
    primarykey
    data
    text
    <p>I am working on a iPad ordering web app at the moment which consists of different pieces of clothing. The linesheet will be built like this:</p> <p>20-30 different product will be shown in the same form. Every product have five different sizes to choose from and every size has a different quantity depending on what the buyer would like to order. </p> <p>I have a products table with the following columns:</p> <pre><code>id product_number product_name product_size product_color product_description product_image product_title product_category product_composition product_price_wholesale_dkk product_price_wholesale_eur product_price_retail_dkk product_price_retail_eur product_active product_detail_one product_detail_two product_detail_three product_xsmall (activate size for this product? is it avail.) product_small (activate size for this product? is it avail.) product_medium (activate size for this product? is it avail.) product_large (activate size for this product? is it avail.) product_xlarge (activate size for this product? is it avail.) </code></pre> <p>and an orders table with the following columns:</p> <pre><code>id order_store order_reference order_mail order_payment_details order_products order_value_total_wholesale_dkk order_value_total_retail_dkk order_value_total_wholesale_eur order_value_total_retail_eur order_date order_phone order_VAT order_address order_comments order_product_numbers order_product_pieces order_store_country </code></pre> <p>My problem is that I can't figure out how the database should be set up. When the order confirmation is sent to the buyer every product should be listed with the specific number of sizes for every product, and since every size might or might not be selected it needs to identify which ones has been chosen and how many of the particular size for the particular product.</p> <p>How will I be able to make the system check first of all which sizes for the specific product has been ordered and then next how many of that size (database wise) and then PHP wise when choosing the tables in my script?</p> <p>Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload