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


PHP Items::getItemTags方法代码示例

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


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

示例1: getDetailedPlayerItems

 public static function getDetailedPlayerItems($playerId, $gameId)
 {
     /* OTHER ITEMS */
     $query = "SELECT DISTINCT i.item_id, i.name, i.description, i.max_qty_in_inventory, i.weight, i.type, i.url, pi.qty, m.file_path as media_url, m.game_id as media_game_id, im.file_path as icon_url, im.game_id as icon_game_id FROM (SELECT * FROM player_items WHERE game_id={$gameId} AND player_id = {$playerId}) as pi LEFT JOIN (SELECT * FROM items WHERE game_id = {$gameId}) as i ON pi.item_id = i.item_id LEFT JOIN media as m ON i.media_id = m.media_id LEFT JOIN media as im ON i.icon_media_id = im.media_id WHERE i.type != 'ATTRIB' GROUP BY i.item_id";
     $result = Module::query($query);
     $contents = array();
     while ($content = mysql_fetch_object($result)) {
         if ($content->media_url) {
             $content->media_url = Config::gamedataWWWPath . '/' . $content->media_url;
             $content->media_thumb_url = substr($content->media_url, 0, strrpos($content->media_url, '.')) . '_128' . substr($content->media_url, strrpos($content->media_url, '.'));
         }
         if ($content->icon_url) {
             $content->icon_url = Config::gamedataWWWPath . '/' . $content->icon_url;
             $content->icon_thumb_url = substr($content - icon_url, 0, strrpos($content - icon_url, '.')) . '_128' . substr($content - icon_url, strrpos($content - icon_url, '.'));
         }
         $content->tags = Items::getItemTags($content->item_id)->data;
         $contents[] = $content;
     }
     return $contents;
 }
开发者ID:kimblemj,项目名称:server,代码行数:20,代码来源:items.php


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