當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Rank::find_by_translated方法代碼示例

本文整理匯總了PHP中Rank::find_by_translated方法的典型用法代碼示例。如果您正苦於以下問題:PHP Rank::find_by_translated方法的具體用法?PHP Rank::find_by_translated怎麽用?PHP Rank::find_by_translated使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Rank的用法示例。


在下文中一共展示了Rank::find_by_translated方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_stats_for_family

 private function get_stats_for_family($taxon_concept_id)
 {
     $query = "SELECT COUNT(DISTINCT he_children.taxon_concept_id) as count\n            FROM hierarchy_entries he\n            JOIN hierarchy_entries_flattened hef on (he.id=hef.ancestor_id)\n            JOIN hierarchy_entries he_children on (hef.hierarchy_entry_id=he_children.id)\n            JOIN taxon_concepts tc on (he_children.taxon_concept_id=tc.id)\n            JOIN hierarchies h on (he_children.hierarchy_id=h.id)\n            LEFT JOIN taxon_concept_metrics tcm ON (he_children.taxon_concept_id=tcm.taxon_concept_id)\n            WHERE he.taxon_concept_id={$taxon_concept_id}\n            AND he.published=1\n            AND tc.published=1\n            AND tc.supercedure_id=0\n            AND he.visibility_id=" . Visibility::visible()->id . "\n            AND he_children.rank_id IN (" . Rank::find_by_translated('label', 'sp.')->id . ", " . Rank::find_by_translated('label', 'species')->id . ")\n            AND tcm.richness_score >= .4";
     $count_of_rich_species = $this->mysqli->select_value($query);
     $media_counts = TaxonConcept::media_counts($taxon_concept_id);
     $all_media_count = @$media_counts['image'] + @$media_counts['video'] + @$media_counts['sound'];
     return array('NumberRichSpeciesPagesInEOL' => $count_of_rich_species, 'NumberImagesInEOL' => @$media_counts['image'], 'NumberArticlesInEOL' => @$media_counts['text'], 'NumberMediaInEOL' => $all_media_count, 'RichPageOnEOL' => $count_of_rich_species >= 0 ? 'http://eol.org/schema/terms/yes' : 'http://eol.org/schema/terms/no');
 }
開發者ID:eliagbayani,項目名稱:maps_test,代碼行數:8,代碼來源:EolStatsDataConnector.php


注:本文中的Rank::find_by_translated方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。