Keeping this clean and to the point:
I have two MySQL tables, users (id, nick) and bans (id, banned, bannedBy, length). I want to display in a table a list of bans, but instead of displaying the banned ID and the bannedBy ID, I want to display their nick. I can use an JOIN to get the nick of one of them, in something like this:
SELECT bans.id,bans.banned,bans.bannedBy,bans.length,users.nick
FROM bans
JOIN users ON users.id=bans.banned
But then I can't get the bannedBy's nick, and vice verca.
I hope I was clear, thanks in advance for any help.