Formating MySQL
#4

Well do some counting and some analyzing, lets see the string:

pawn Код:
UPDATE `Test` SET Money = %i WHERE Username = '%s'
The length of this string is 50 without any of the inserted values. So now lets check the values that will go into it:

Username: Max length of 24, so that makes the maximum length of the query, 74.

Money: How much money can a user have in your server? You've only used a maximum of 74 out of your specified 200, so unless a player can have over 125 digits in their money, then your string is definitely long enough, if not too long for this query, as I doubt a player should have over 125 digits in their money.

Edit: I made a slight error in calculation with the string length, without any inserted values from the format, it would be 46
Reply


Messages In This Thread
Formating MySQL - by Raimis_R - 18.11.2010, 14:25
Re: Formating MySQL - by JaTochNietDan - 18.11.2010, 14:32
Re: Formating MySQL - by Raimis_R - 18.11.2010, 14:33
Re: Formating MySQL - by JaTochNietDan - 18.11.2010, 14:41
Re: Formating MySQL - by Raimis_R - 18.11.2010, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)