SELECT * FROM videos_group_view as v LEFT JOIN users_groups as ug ON users_groups_id = ug.id WHERE videos_id = \nError : (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 '' at line 1