|
Member
|

08-14-2012
, 07:46
Question about MYSQLX read & write
|
#1
|
Hey, im again and im still on it...
I try to rewrite the sql funktion of the wowmod, because there is to much stuff to load, and read at one time! I ask me by the way what could be a better way to split the data of it!
My first idea iss to handle the basic informations alone, like race, class, class1 and so on, because at this moment its all together in one column. But if we want to do some "fast" checks we have to use all of it, so there will be more information to load then needed. The problem for me is, i dont know whats better, to create for all informations a own table with own columns for things like "player_char" and "player_spells" or is it fast enough to split them in the existing table?!
The example like it is atm for player data `data` TEXT NOT NULL:
Code:
format( data, 512, "%d %d %d %d %d %d %d %d %d %d %d %d",
p_race[id], p_class1[id], p_class2[id], p_xp[id], p_str[id], p_agi[id],
p_stam[id], p_int_unb[id], p_spir[id], p_armor[id], p_mana_base[id], p_gold[id] )
format( data2, 512, "%s %d", data, p_tier[id] )
format( data, 512, "%s %d %d %d %d %d",
data2, p_assists[id], p_roguespec[id], p_rezzes[id], p_teamacts[id], p_badges[id] )
format( data2, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data, p_spells[id][0], p_spells[id][1], p_spells[id][2], p_spells[id][3],
p_spells[id][4], p_spells[id][5], p_spells[id][6], p_spells[id][7],
p_spells[id][8], p_spells[id][9] )
format( data, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data2, p_spells[id][10], p_spells[id][11], p_spells[id][12], p_spells[id][13],
p_spells[id][14], p_spells[id][15], p_spells[id][16], p_spells[id][17],
p_spells[id][18], p_spells[id][19] )
format( data2, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data, p_spells[id][20], p_spells[id][21], p_spells[id][22], p_spells[id][23],
p_spells[id][24], p_spells[id][25], p_spells[id][26], p_spells[id][27],
p_spells[id][28], p_spells[id][29] )
format( data, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data2, p_spells[id][30], p_spells[id][31], p_spells[id][32], p_spells[id][33],
p_spells[id][34], p_spells[id][35], p_spells[id][36], p_spells[id][37],
p_spells[id][38], p_spells[id][39] )
format( data2, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data, p_spells[id][40], p_spells[id][41], p_spells[id][42], p_spells[id][43],
p_spells[id][44], p_spells[id][45], p_spells[id][46], p_spells[id][47],
p_spells[id][48], p_spells[id][49] )
format( data, 512, "%s %d %d %d %d %d %d %d %d %d %d",
data2, p_spells[id][50], p_spells[id][51], p_spells[id][52], p_spells[id][53],
p_spells[id][54], p_spells[id][55], p_spells[id][56], p_spells[id][57],
p_spells[id][58], p_spells[id][59] )
format( data2, 512, "%s %d %d %d %d %d %d %d %d",
data, p_kills[id], p_deaths[id], p_rounds[id], p_casts[id], p_heals[id], p_bombs[id],
p_defuses[id], p_supports[id] )
format( data, 512, "%s %d %d %d %d %d %d %d %d %d",
data2, p_melee[id], p_marksman[id], p_arcane[id], p_fire[id], p_frost[id],
p_shadow[id], p_nature[id], p_holy[id], p_badges2[id] )
What would you say?!
Thanks by the way for any idea or suggestion!
__________________
oOOOoooh it's www.Cs-Attack.de
New World of Warcraft Mod Beta 0.5(based on WC3FT 3.5)
Counterstrike 1.6 SERVER:
Server IP: 193.192.58.154:27200
CONDITION ZERO SERVER:
Server IP: 193.192.58.154:27016
Last edited by CS-A-Roland; 08-14-2012 at 07:51.
|
|