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 'groups.*, permissions.id AS permissions FROM groups LEFT JOIN permissions' at line 1 SELECT groups.*, permissions.id AS permissions FROM groups LEFT JOIN permissions ON (permissions.group_id = groups.id) WHERE (groups.id = 5) ORDER BY groups.id DESC Array ( [:id] =