当前位置: 首页>>代码示例>>PHP>>正文


PHP Rank::species_ranks_ids方法代码示例

本文整理汇总了PHP中Rank::species_ranks_ids方法的典型用法代码示例。如果您正苦于以下问题:PHP Rank::species_ranks_ids方法的具体用法?PHP Rank::species_ranks_ids怎么用?PHP Rank::species_ranks_ids使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Rank的用法示例。


在下文中一共展示了Rank::species_ranks_ids方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: end_load_data

 function end_load_data()
 {
     echo "removing data files\n";
     unlink(DOC_ROOT . "temp/top_images.sql");
     unlink(DOC_ROOT . "temp/top_unpublished_images.sql");
     // swap temporary tables with real tables
     $result = $this->mysqli->query("SELECT 1 FROM top_images_tmp LIMIT 1");
     if ($result && ($row = $result->fetch_assoc())) {
         $this->mysqli->update("RENAME TABLE top_images TO top_images_swap,\r\n                                                top_images_tmp TO top_images,\r\n                                                top_images_swap TO top_images_tmp");
     }
     $result = $this->mysqli->query("SELECT 1 FROM top_unpublished_images_tmp LIMIT 1");
     if ($result && ($row = $result->fetch_assoc())) {
         $this->mysqli->update("RENAME TABLE top_unpublished_images TO top_unpublished_images_swap,\r\n                                                top_unpublished_images_tmp TO top_unpublished_images,\r\n                                                top_unpublished_images_swap TO top_unpublished_images_tmp");
     }
     $species_rank_ids = implode(",", Rank::species_ranks_ids());
     // maybe also add where lft=rgt-1??
     echo "top_species_images\n";
     $this->mysqli->delete("DELETE FROM top_species_images");
     $this->mysqli->update("INSERT INTO top_species_images (SELECT ti.* FROM hierarchy_entries he JOIN top_images ti ON (he.id=ti.hierarchy_entry_id) WHERE he.rank_id IN ({$species_rank_ids}))");
     echo "top_unpublished_species_images\n";
     $this->mysqli->delete("DELETE FROM top_unpublished_species_images");
     $this->mysqli->update("INSERT INTO top_unpublished_species_images (SELECT tui.* FROM hierarchy_entries he JOIN top_unpublished_images tui ON (he.id=tui.hierarchy_entry_id) WHERE he.rank_id IN ({$species_rank_ids}))");
     $this->mysqli->end_transaction();
 }
开发者ID:eliagbayani,项目名称:maps_test,代码行数:24,代码来源:TopImages.php


注:本文中的Rank::species_ranks_ids方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。