I am trying to relate two tables: one is the Joomla users table (primary key is id) and the other is a user information table. Both tables contain the username. But I don't want to make the primary key the username in the information table because I need to allow multiple records for some of the usernames. How can I use the foreign key to match the two tables? I would rather not force the second table to have the id field if I can help it.
Thank you,
Karen
Thank you,
Karen
Hi Karen,
The usual setup is to have the 2nd table have a field named "user_id" which contains the user id from the first table, then you can use user_id as the foreign key and select the relation type as "multiple matching" if you are going to have multiple records per user.
Best regards
The usual setup is to have the 2nd table have a field named "user_id" which contains the user id from the first table, then you can use user_id as the foreign key and select the relation type as "multiple matching" if you are going to have multiple records per user.
Best regards
This topic is locked and no more replies can be posted.