Hi,
I'm newbie in php and i'm currently working on my site.
Well i will some advertising options (paying) and trials free. I need some advice to setup my db structure.
I have this tables
customers
products
orders
orders_products
trials
My question is i don't want to let trials stored in my customers because they are only customers if they choose for paying advertising on my website.
Also another problem i maybe will have is when i run a second site on the same db and the same customers advertise on a second site and they want to change their info only for the second site then i don't know how i can fix this? Do i have to store the customers 2 times then so they can change like their address on one site and not on the other?
Site & DB structure
Moderator: General Moderators
You could just add a column in `customers` that sets which site the customer is for. You should have a column like that in all your tables. This, of course, means you should also have a `websites` table to map the website name to an id or a number.
You could make another table called `trial_customers` and just store trial customers in there.
You could make another table called `trial_customers` and just store trial customers in there.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.