I have a table named 'accounts' with fields UserId and Username. I have another table called 'logs', where there are fields EventId, UserId, LogDate, EventParams.
Is it possible to somehow 'link' the UserId of both tables? Like, I would like to search throught the logs using the username.
I tried "SELECT * FROM `logs`, `accounts` WHERE logs.UserId = accounts.UserId AND accounts.Username = Someuser" But it didn't worked.
Is it possible to somehow 'link' the UserId of both tables? Like, I would like to search throught the logs using the username.
I tried "SELECT * FROM `logs`, `accounts` WHERE logs.UserId = accounts.UserId AND accounts.Username = Someuser" But it didn't worked.