26.11.2011, 15:13
Well, I'm trying to convert Godfather's account system (fail ini functions) to MySQL, and I'm having a problem.
There are 76 fields at my user table. So I suppose I have to use:
But when I do this, it increases my stack/heap size from (unknown because the pawn compiler doesn't show it, so it's good) to 49636 kb (the maximum is 16384). Obviously this happen because what the 'new' does is creating 76 variables with 64 cells.
If I place this Field[76][64] at the top of the string, no stack/heap message is produced.
Also, only one field is sized 64, the rest are integers (11) and a varchar (24).
So what should I do to split the fields? Place Field at the top of the script assuming it isn't overflowing the max stack/heap size or live with it using 76 mysql_fetch_field()?
There are 76 fields at my user table. So I suppose I have to use:
pawn Код:
new Field[76][64]; //64 is the largest field size at my table
if(mysql_fetch_row(data))
{
explode(Field, data, "|");
//Blahblahblah
}
If I place this Field[76][64] at the top of the string, no stack/heap message is produced.
Also, only one field is sized 64, the rest are integers (11) and a varchar (24).
So what should I do to split the fields? Place Field at the top of the script assuming it isn't overflowing the max stack/heap size or live with it using 76 mysql_fetch_field()?