|
|||||||||||
|
adding event in 2nd table??
From: Prasad Mhatre <prasad(at)elecom.com>
Date: Wed Oct 31 2007 - 01:01:07 EDT
I am having 2 tables as follow: Table 1-----> customer_id | contacts | etc this table has unique customer_id while Table 2 may have more than 2 records with the same customer_id Table 2-----> customer_id | visit_no | details of visit I want to know an example of updating the Table 2 with autoincrementing the visit_no respective to the customer_id e.g.
Table 1
1001 tel. nos. etc.
1002 tel. nos. etc.
1003 tel. nos. etc.
Table 2
1001 1 details
1001 2 details
1001 3 details
1002 1 details
1002 2 details
1003 1 details
1003 2 details
1003 3 details
1003 4 details
Can anyone suggest an example for this type of table? or someother way of having the same results. At present I can update the records in 2nd table by manually entering visit_no value, but one has to remember the previous visit. Any help is appreciated.
Thanks
This archive was generated by hypermail 2.1.8 : Thu Jul 03 2008 - 08:43:50 EDT |
||||||||||
|
|||||||||||