Displaying 1 result from an estimated 1 matches for "jos_us".
Did you mean:
joskus
2010 May 01
1
I need some help joining data from 3 MySQL tables, please
Hi all,
I am trying to display collective data from 3 MySQL tables:
The query I have, so far, is
SELECT c . * , COUNT( m.id ) AS `members`
FROM `jos_mls_teams` AS `c`
LEFT JOIN `jos_mls_teams_members` AS `m` ON m.teamid = c.id
RIGHT JOIN ( SELECT u.name, u.lastvisitDate FROM `jos_users` AS `u` )
ON u.id = m.userid
GROUP BY c.id
LIMIT 0 , 30
But get the following error:
#1248 - Every derived table must have its own alias
A google search results suggested the alias should be put after the bracket.
So, I change the code as follow, and move the *AS `u`* outside the right
brac...