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 'and ni_crumbID = bread_crumbs.ID and ni_authorID = logon_user.ID group by ni_cru' at line 1