mysql saving error
#3

Quote:
Originally Posted by PowerPC603
Посмотреть сообщение
Why do you use one huge query to update all fields?
Just create separate queries to update the fields that need to be changed.

For example: a player earns money from doing something, like doing a job.
You should only update his money in such a case, not update ALL fields in his account, where 99% of them stays the same.

Or when the player makes a kill and you wanna save that.
Create a query to only update his kills in this case.

Or when his health changes, or his armour, only change these values instead of just calling this huge query.

It's a database that can handle these things easily (that's what databases do and what they are designed for), you're not dealing with files where you need to rewrite the file when 1 thing changes.

I can't imagine why you're updating his walkstyle for example, when he only buys a house or something, or completes a job.


And with many smaller queries, you're less likely to make mistakes such as this one.
This is quite bullshit, you want him send queries everytime he kills a player? That would use much resources & would cause lags when there are like 25+ players!
Reply


Messages In This Thread
mysql saving error - by EmilLykke - 22.12.2014, 15:57
Re: mysql saving error - by PowerPC603 - 22.12.2014, 16:15
Re: mysql saving error - by Guest4390857394857 - 22.12.2014, 16:22
Re: mysql saving error - by EmilLykke - 22.12.2014, 16:24
Re: mysql saving error - by Vince - 22.12.2014, 17:46
Re: mysql saving error - by PowerPC603 - 22.12.2014, 21:26
Re: mysql saving error - by Guest4390857394857 - 01.01.2015, 15:52

Forum Jump:


Users browsing this thread: 1 Guest(s)