Hi All,
I am trying to join three tables with this query:
select pl.player_name AS the_player, pl.player_id, s.report_id
from players as pl
left outer
join player_stats as s
on s.player_id = pl.player_id
left outer
join r.reports as r
on r.report_id = s.report_id
where pl.player_id = 22
However I get the message:
SELECT command denied to user 'my_user_name'@'localhost' for table 'reports'
However if I just do it without the last join e.g. just a two table:
select pl.player_name AS the_player, pl.player_id, s.report_id
from players as pl
left outer
join player_stats as s
on s.player_id = pl.player_id
where pl.player_id = 22
It works fine, so it's getting lost somewhere here on the third join:
left outer
join r.reports as r
on r.report_id = s.report_id
But cant see where? Any ideas?
Thanks