private static function PerformItemsSearch() { if (!isset(self::$m_results['items'])) { self::$m_results['items'] = array(); } // Find item IDs $items = DB::World()->select("\n SELECT\n `a`.`entry`\n FROM `%s` AS `a`\n WHERE %s LIKE '%s' LIMIT 200", WoW_Locale::GetLocaleID() != LOCALE_EN ? 'locales_item' : 'item_template', WoW_Locale::GetLocaleID() != LOCALE_EN ? '`a`.`name_loc' . WoW_Locale::GetLocaleID() . '`' : '`a`.`name`', '%' . self::$m_query . '%'); if (!$items) { return; } $item_id = array(); foreach ($items as $item) { // Generate IDs array $item_id[] = $item['entry']; } // Request items self::$m_results['items'] = WoW_Items::GetExtendedItemInfo($item_id); }