I found this same question, followed the steps but still an error.
I've been searching this for many days.
I have 3 tables
user
+----+-----------------------------+-------------+ | id | fname | lname | +----+-----------------------------+-------------+ | 4 | John | Menezes | +----+-----------------------------+-------------+ group
+----+-----------------------------+-------------+ | group_id | group_name | created_on | +----+-----------------------------+-------------+ | 1 | Facebook friends | 25/12/2012 | +----------+-----------------------+-------------+ group_members
+----+-------------+-------------+ | id | user_id | group_id | +----+-------------+-------------+ | 4 | 4 | 1 | +----+-------------+-------------+ I want to get Somewhat like this Final Output
+----+--------------+-----------------------+ | fname | lname | groupname | +----+--------------+-----------------------+ | John | Menezes | Facebook Friends | +----+--------------+-----------------------+ I used this query
SELECT u.fname, u.lname, g.group_name FROM user AS u LEFT JOIN group_members AS gm ON gm.user_id = u.id INNER JOIN group AS g ON g.group_id = gm.group_id But its giving me this error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group AS g ON g.group_id = gm.group_id LIMIT 0, 30' at line 4
Also tried this
where g.low_limit > 70 and g.high_limt < 120