04.02.2017, 14:56
Quote:
The limit isn't from MySQL but rather from pawn. My script usually dies (process stops working) if I use an array over 2048 size which isn't that odd. Anyhow, if you really want to create a big array, go with 2048 as size for the string.
Why they need to have 126? They don't really have to, it's just that most people setup strings like that, although they usually use 128 instead of 126 . Only thing that it tells is how long your string will be, and with string I mean char array. Remember the one-dimensional row? Well strings are one-dimensional character arrays in pawn. Код:
new string[5] = "Hello"; string[0] == 'H' string[1] == 'e' string[2] == 'l' string[3] == 'l' string[4] == 'o' Код:
new query[128]; format(query, sizeof(query), "UPDATE some_table SET some_column_name = %i", some_integer); The point of assigning smaller sized arrays is that, you wouldn't want to fill your room with lots of space but not filling it with items right? Same thing with arrays, you don't want to create more "spots" (indexes) than it has to be, sure it's still nice to have some space left over in the room, same in the array just to be sure. EDIT: Sorry I started typing when there was no response. EDIT2: Just read the above response, the limit is not 125 lmao. |
However if he needs more he could set it to something larger.
And the query example you gave could have the string length set to something lower.
Код:
new query[64]; format(query, sizeof(query), "UPDATE some_table SET some_column_name = %i", some_integer);