Computed code db query issue -- working in PHPmyadmin but not field
What you wrote is not PHP code, which is what a computed field is expecting.
I would rather use the following code.

$entity_field[0]['value'] = db_query("SELECT entity_id FROM {field_data_field_review_venue_reference} vr WHERE vr.field_review_venue_reference_target_id = :id", array(':id' =&gt; $entity-&gt;nid))
  -&gt;fetchField();