I'm trying to construct a join, but the effect I want seems to be impossible to achieve. In this schema, the "uid" field is unique in the "players" table, but not in the "ranking" table (one player per uid, multiple rankings per player)
I want to select player names and rankings for a particilar game SELECT player_name,players.uid,e_mail,ranking.value from participant left join players left join ranking on participant.pid = players.uid on participant.pid = ranking.uid where tid='7' and ranking.variation='zertz' This works perfectly if the ranking table actually exists, but if there is no ranking table, the entire row is filtered out by the "and ranking.variation='zertz'" since that is nulled the join. If I make the where clause where tid='7' and (ranking.variation='zertz' or ranking.variation is null) Instead of getting one row per UID, I get many. Appently instead of getting N rows (one per uid) I get N^2 rows, N per UID. Is there a trick I'm missing? Is this a join bug? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]