error in pg/register

hello, when I go to the register page, I have the next error.



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


Now, I make a custom index to register, and works fine, any idea?????