當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。