Error getting author list: 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 '[+bID+] AND r.rSourceType="books" ORDER BY rOrder, fullUserName' at line 7

SQL = SELECT DISTINCT uid, aURLSlug, CASE WHEN dname IS null OR dname = "" THEN fullname ELSE dname END AS fullUserName FROM relationships r INNER JOIN user_profiles u ON r.rTarget=u.uid INNER JOIN `johnhunt_modx`.`web_user_attributes` wa ON wa.internalkey=u.uid INNER JOIN books b ON r.rSource=b.bID INNER JOIN books_meta m ON b.bID=m.bmBookID WHERE r.rFilter=3 AND r.rType="user" AND bActiveFlag=1 AND bWebSiteFlag=1 AND (bStatus=4881 OR bStatus=4880) AND bmPubDate<>"0000-00-00" AND r.rSource=[+bID+] AND r.rSourceType="books" ORDER BY rOrder, fullUserName