12.05.2010, 04:48
If you do it like that a (temporary) variable is necessary to store your MYSQL data in.
Let's say that query you use only returns "level" it would look like the following:
mysql_fetch_row( line);
SetPVarInt( playerid, "level", strvalEx(line) )
Let's say it returns "level" and "admin":
mysql_fetch_row_format( line, "|" );
new level,admin;
sscanf( line, "p<|>dd",level,admin);
SetPVarInt( playerid, "level", level );
SetPVarInt( playerid, "admin", admin);
Obviously this is just to give you an idea what's wrong there.
I am pretty sure you can think of a better workaround than declaring ~20 variables to store your data temporary in before storing that in a PVar
.
Let's say that query you use only returns "level" it would look like the following:
mysql_fetch_row( line);
SetPVarInt( playerid, "level", strvalEx(line) )
Let's say it returns "level" and "admin":
mysql_fetch_row_format( line, "|" );
new level,admin;
sscanf( line, "p<|>dd",level,admin);
SetPVarInt( playerid, "level", level );
SetPVarInt( playerid, "admin", admin);
Obviously this is just to give you an idea what's wrong there.
I am pretty sure you can think of a better workaround than declaring ~20 variables to store your data temporary in before storing that in a PVar
