LastDeath 5 Опубликовано 24 сентября, 2014 Кто поможет написать запрос для сборки open-team? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Boolean 121 Опубликовано 24 сентября, 2014 О каком запросе речь? Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
Elione 265 Опубликовано 25 сентября, 2014 c 5го возьми за пример и допили. Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты
ghostik32 4 Опубликовано 25 сентября, 2014 (изменено) Вот загенерил, распихай их по методам # Server type: OpenTeam (hf)# accountsSELECTlogin, password, access_level, lastactive AS last_activeFROM accounts# charactersSELECTcharacters.account_name, characters.obj_Id AS char_id, characters.char_name, characters.sex, characters.x, characters.y, characters.z, characters.karma, characters.pvpkills, characters.pkkills, characters.clanid AS clan_id, characters.title, characters.accesslevel AS access_level, characters.online, characters.onlinetime, character_subclasses.class_id AS base_class, character_subclasses.level, character_subclasses.exp, character_subclasses.sp, character_subclasses.maxHp, character_subclasses.curHp, character_subclasses.maxCp, character_subclasses.curCp, character_subclasses.maxMp, character_subclasses.curMp, clan_data.clan_name, clan_data.clan_level, clan_data.hasCastle, clan_data.crest AS clan_crest, clan_data.reputation_scoreFROM charactersLEFT JOIN character_subclasses ON character_subclasses.char_obj_id = characters.obj_Id AND character_subclasses.isBase = 1LEFT JOIN clan_data ON clan_data.clan_id = characters.clanid# clansSELECTclan_data.clan_id, clan_data.clan_name, clan_data.leader_id, clan_data.clan_level, clan_data.hasCastle, clan_data.crest AS clan_crest, clan_data.reputation_score, (SELECT COUNT(0) FROM characters WHERE characters.clanid = clan_data.clan_id) as ccount, ally_data.ally_name, ally_data.crest AS ally_crest, ally_data.ally_id, characters.account_name, characters.obj_Id AS char_id, characters.char_name, characters.sex, characters.x, characters.y, characters.z, characters.karma, characters.pvpkills, characters.pkkills, characters.title, characters.accesslevel AS access_level, characters.online, characters.onlinetime, character_subclasses.class_id AS base_class, character_subclasses.level, character_subclasses.exp, character_subclasses.sp, character_subclasses.maxHp, character_subclasses.curHp, character_subclasses.maxCp, character_subclasses.curCp, character_subclasses.maxMp, character_subclasses.curMpFROM clan_dataLEFT JOIN ally_data ON clan_data.ally_id = ally_data.ally_idLEFT JOIN characters ON characters.obj_Id = clan_data.leader_idLEFT JOIN character_subclasses ON character_subclasses.char_obj_id = characters.obj_Id AND character_subclasses.isBase = 1# itemsSELECTitems.owner_id, items.object_id, items.item_id, items.count, items.enchant_level, items.loc, items.loc_dataFROM items# insertItemsINSERT INTO `items_delayed` (`owner_id`, `item_id`, `count`, `enchant_level`, `description`) VALUES(:owner_id, :item_id, :count, :enchant_level, :description)# getCountRaceHumanSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98) AND character_subclasses.isBase = 1# getCountRaceElfSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 99, 100, 101, 102, 103, 104, 105) AND character_subclasses.isBase = 1# getCountRaceDarkElfSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 106, 107, 108, 109, 110, 111, 112) AND character_subclasses.isBase = 1# getCountRaceOrkSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (44, 45, 46, 47, 48, 49, 50, 51, 52, 113, 114, 115, 116) AND character_subclasses.isBase = 1# getCountRaceDwarfSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (53, 54, 55, 56, 57, 117, 118) AND character_subclasses.isBase = 1# getCountRaceKamaelSELECTCOUNT(0) as countFROM character_subclassesWHERE class_id IN (123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 139, 140, 141, 142, 143, 144, 145, 146) AND character_subclasses.isBase = 1# getCountAccountsSELECT COUNT(0) as count FROM accounts# getCountCharactersSELECT COUNT(0) as count FROM characters# getCountOnlineCharactersSELECT COUNT(0) as count FROM characters WHERE online = 1# getCountClansSELECT COUNT(0) as count FROM clan_data# getCountMenSELECT COUNT(0) as count FROM characters WHERE sex = 0# getCountWomenSELECT COUNT(0) as count FROM characters WHERE sex = 1# getCastlesSELECTcastle.id, castle.name, castle.taxPercent, castle.siegeDate, clan_data.clan_id, clan_data.clan_name, clan_data.leader_id, clan_data.clan_level, clan_data.hasCastle, clan_data.crest AS clan_crest, clan_data.reputation_score, ally_data.ally_name, ally_data.crest AS ally_crest, ally_data.ally_idFROM castleLEFT JOIN clan_data ON castle.id = clan_data.hasCastleLEFT JOIN ally_data ON clan_data.ally_id = ally_data.ally_id# getSiegeSELECTsiege_clans.unit_id AS castle_id, siege_clans.type, clan_data.clan_id, clan_data.clan_name, clan_data.leader_id, clan_data.clan_level, clan_data.hasCastle, clan_data.crest AS clan_crest, clan_data.reputation_score, ally_data.ally_name, ally_data.crest AS ally_crest, ally_data.ally_idFROM siege_clansLEFT JOIN clan_data ON siege_clans.clan_id = clan_data.clan_idLEFT JOIN ally_data ON clan_data.ally_id = ally_data.ally_id Изменено 25 сентября, 2014 пользователем ghostik32 Поделиться сообщением Ссылка на сообщение Поделиться на другие сайты