hi
I'm new to PHP/MYSQL...
I've currently setup a simple database for customers (just adds a unique id, name, email etc for each customer).
But now I'm looking into PayPal IPN stuff where the data gathered is sent back and stored in the database.
At this stage I don't particularly want to do much with the data, I just figured it might be an idea to store it for later use (when I do hire a developer to setup a proper ecommerce store)
What I'm wondering is how you setup something like this:
- customer 1
--- order
--- order
- customer 2
--- order
etc
Is there a particular way to store data in this way or is it just a matter of matching up an id or email and then just displaying them in a certain way?
cheers
nathan
How would I structure this?
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Three tables: customer, order, order line item
where -< is a one-to-many relationship.
Code: Select all
customer -< order -< order line itemThis is more of a description for an order line item table.nado wrote:Order table row:
id (cust) | id (order) | item | price | etc