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 mb.age>='0' AND mb.age<='200' AND mb.id=profile.member_id AND prof' at line 3