Hello everybody,
I'm having troubles creating a relation between two tables in a MySQL database.
Having two tables, being one which contains users information (username, password, user ID, etc) and the other the one which contains transactions information (operation type, user ID of the user who did the transaction, etc), How can i create a relation between any transaction done by each user?
I tried making user ID a primary key for both tables, but when i try to create a second entry with the same user ID on the 'Transactions' table, MySQL tells me that it must be unique, since it's a primary key.
What i want is to run a query for matching all the "transactions" made by an specific "user ID" , How can i do that?
Thanks in advance, and please excuse my poor english