Problem:
I am trying to “translate” the id in two columns in a grading table (betyg_essays) to the real names of those users in another table (betyg_users).
The grading table (betyg_essays) look like this:

The user table (betyg_users) looks like this:

PHP code (so far):
$query = 'SELECT * FROM betyg_essays JOIN betyg_users ON betyg_essays.Examiner = betyg_users.UID';
Examiner/Supervisor columns (betyg_essays) correspond to the UID column (betyg_users).
Desired output should be (using the Firstname/Lastname columns):
- Examiner: John Hopkins. Supervisor: Mike Baker.
- Examiner: John Hopkins. Supervisor: Mike Baker.
Non-working SQL query:
$query = "SELECT
(u1.Firstname + ' ' + u1.Lastname) AS Examiner,
(u2.Firstname + ' ' + u2.Lastname) AS Supervisor
FROM betyg_essays grade
INNER JOIN betyg_users u1 ON grade.Examiner = u1.UID
INNER JOIN betyg_users u2 ON grade.Supervisor = u2.UID";
I didn’t tried the code, you might need to make some adjustments.
UPDATE: Fixed the id’s
UPDATE2:
I have changed the + to CONCAT function. Apparently, MySQL handles string differently then SQL Server.