Problem retrieving the key and search people

Hello I have this problem when someone wants to get this error log DatabaseException


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 m.name_id=80' at line 1

QUERY: SELECT m.*, n.string as name, v.string as value from elgg_metadata m JOIN elgg_entities e ON e.guid = m.entity_guid JOIN elgg_metastrings v on m.value_id = JOIN elgg_metastrings n on m.name_id = where m.entity_guid= and m.name_id=80

how I can fix this?