22.12.2014, 16:15
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.
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.