Dear Friends,
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
customer_id | contacts | etc
1001 tel. nos. etc.
1002 tel. nos. etc.
1003 tel. nos. etc.
Table 2
customer_id | visit_no | details of visit
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
Love and regards
Prasad
| Thread |
|---|
| • adding event in 2nd table?? | Prasad Mhatre | 31 Oct |