Skip to content

Instantly share code, notes, and snippets.

@nicomen
Created October 11, 2013 11:12
Show Gist options
  • Save nicomen/6933062 to your computer and use it in GitHub Desktop.
Save nicomen/6933062 to your computer and use it in GitHub Desktop.
in lib/ABCN/Infrastructure/ArticleScript.php
public function getVideoArticleIdByMediaId($mediaId) {
$query = 'SELECT * FROM content_type_content_video WHERE field_mediamaker_id_value = %s LIMIT 1';
$result = $this->db->doQuery($query, array($mediaId));
if (!$result) {
return false;
}
if (!$result->numRows()) {
return false;
}
$content = $result->fetchAssoc();
return $content['nid'];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment