MySQL Forums
Forum List  »  German

Re: Zwei Spalten mit einer verknüpfen
Posted by: Maximilian Schmid
Date: November 06, 2019 06:54AM

Ich habe selbst eine Lösung gefunden:

SELECT messages.fromuid AS fromuid,
messages.touid AS touid,
u1.username AS fromuser,
u2.username AS touser
FROM messages
INNER JOIN users u1 ON u1.uid = messages.fromuid
INNER JOIN users u2 ON u2.uid = messages.touid
WHERE messages.touid = 1 OR messages.fromuid = 1

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Zwei Spalten mit einer verknüpfen
107
November 06, 2019 06:54AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.