Page is a not externally linkable
rocknbil - 3:40 pm on Aug 29, 2011 (gmt 0)
Well, it is pretty common to use the auto increment field as the join field, and if you are moving database with an .sql data dump, the primary keys will remain the same. The problem comes in when you attempt to move data by other means. A good example might be, let's create a new email list for a second site. We'll use all the base customer data from table A, just our new mailing list will contain records for who gets emailed, etc.
I usually generate it by one of two means, get the highest record id of the join field and increment it, or just put the current auto increment value in the join id field. That way it never changes.