I am trying to join 3 tables together using the following sql command:
SELECT
tg.Kickoff,
tg.League,
tg.home,
tg.away,
ln.Full,
ln.Mysite,
ln.Country,
tl.mydb
FROM `todaysgames` AS tg
INNER JOIN `leaguenames` AS ln ON tg.League = ln.Othersites
INNER JOIN `teamlookup` AS tl ON tg.home = tl.websitedb
OR tg.away = tl.websitedb;
The issue is I get is it doubles each row.
What I am looking to do is for each tg.home and tg.away is replace it with the tl.websitedb (this basically amends the name).
would this be possible? (Below is the current output)
And here is the desired output