On my database when i do this query:
SELECT *
FROM users u
LEFT JOIN usersToStrategy uts on uts.userID = u.userID
LEFT JOIN strategy s on uts.stratID = s.st
I think you are looking for GROUP_CONCAT
SELECT userID, username, fName, GROUP_CONCAT(stratNames SEPARATOR ', ') AS strats
FROM users u
LEFT JOIN usersToStrategy uts on uts.userID = u.userID
LEFT JOIN strategy s on uts.stratID = s.stratID
GROUP BY userID, username, fName
You use GROUP_CONCAT.
Use GROUP_CONCAT
like this
SELECT userID,
username,
fName,
GROUP_CONCAT(stratNames)
FROM users u
LEFT JOIN usersToStrategy uts on uts.userID = u.userID
LEFT JOIN strategy s on uts.stratID = s.stratID
GROUP BY username;