On Aug 11, 2009, at 3:04 AM, "Leidago !Noabeb" <leidago@xxxxxxxxxxxxxx> wrote:
Hi I have the following tables setup in MYSQL: Region 1 Region 2 HQ Tbl1 with autonumbered (PK) Tbl1 with autonumbered (PK) Tbl1 autonumbered-PK To explain the above. Basically there are two regions that collect information and then at the end of each month they have to send the information to HQ. This is fine, but the problem comes when the information (the data in the tables) is submitted to HQ. All three tables have the same names and the same structure. We want to synchronize the information sent by the regions into one table at HQ. How can we do this without having the duplicate number problem? Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
The simplest thing would be to have the main table have it's own auto increment key and use the two sub tables keys as a numerical field, perhaps as a foreign key.
As a general rule, ai keys should only be used for uniqueness, and not have any real meaning within the datasets.
Bastien Sent from my iPod -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php