Raised This Month: $ Target: $400
 0% 

Question about MYSQLX read & write


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CS-A-Roland
Member
Join Date: Jul 2009
Old 08-14-2012 , 07:46   Question about MYSQLX read & write
Reply With Quote #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.
CS-A-Roland is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 08-14-2012 , 12:31   Re: Question about MYSQLX read & write
Reply With Quote #2

Would you format all that in one public funtion? or save every class with its abbilities in a diffrent function?

if you would save all that in one function then i pretty sure that you're way would require more cpu and get more peaks.
also you need to think about how userfriendly managing you're tables on you're database would become

from my expierence with my knifemod bits vaultsaving made by exolent, became buggy for alot of hosters, I myself had problems with it but that's becous of the skins saving method ut sometimes ppl would have upgrades that they didnt even buy.

if you would change the saving and loading of the wow plugin then you have to edit everywhere where that function is called to make you're changes apply in the correct way depending on what needs to be saved so you would need to make checks for what races and abilities they just bought or etc (idk how wow mod works :p)
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 08-14-2012 at 12:34.
striker07 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode