my mysql dilema

admin

Administrator
Staff member
Im actually tring to figure out the right concept on how to make my website work the way i want it to. I sell different products and would like my customer to register it online. I have created two tables. the first table has:

custid - primary key, cutomer id #
fname
lname
address
city
state
zip
phone
emailaddress

second table:

purchaseid - primary key
purchasedate
productid
custid


My Question - i want to keep track of every purchase a customer makes even if its weeks or months apart, the problem is if he is registering his second (third..fourth...) purchase, the system is going to give him a different customerid number for every purchase, so when i query, i would need to know all his id numbers.... it seems there is a more effecient way.

Remember - i am not the one entering the information, the customer is, on a form, the form is being processed by a php script and the info is dumped into the database.

Thanks for any help
 
Back
Top