Hi gang, sorta newish to MySQL so please bear with me... I am putting together a system of referals for my photography company. The referal system works, like many others. A business refers customers to me, for which they recieve a referal fee when the customer pays a deposit.
I can create a the customers, referals, referers, referer_categories, jobs, tables no fuss. How the system will (hopefully) work is a customer calls to book a job, and will have a referal number. This number will be a referer_id in the db so I know who has refered them. easy so far. So I enter the customer details in the customers table, which includes the referal_id. Should I then have a trigger to INSERT the referer_id into the referals table. The referals table contains referal_id INT referer_id INT referal_date I then have a table of jobs for when they book the job. venue, date etc. The payments table also will need to have some sort of mechanism so when a deposit is taken from the customer, the referer is paid thier commission. Am I going in the right direction here? Kind regards Kevin -- "Democracy is two wolves and a lamb voting on what to have for lunch. Liberty is a well-armed lamb contesting the vote." -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]