Each time a user adds a product to their cart, in the CARTS table, a new entry is made with their UserID, the product name, and the price.
When they send the final order, the checkout, the pages and email confirmations combine all order associated with their ID, using SELECT * FROM CARTS WHERE UserId=UserID type deal. Then, the results are displayed using a while loop.
Now, I am trying to add in functionality to add these orders to a seperate orders table. But, the product names and prices coming from the CARTS table and usually coming from more than one row. I want to condense the orders into one variable, which I assume would be done with an array.
Basically, condensing the CART results so that I can add them into the same ORDER insert, because I want 5 different orders in the db for one person... does that make sense?