Mysql login + PVars system
#5

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 .
Reply


Messages In This Thread
Mysql login + PVars system - by kLx - 11.05.2010, 14:46
Re: Mysql login + PVars system - by kLx - 12.05.2010, 04:21
Re: Mysql login + PVars system - by Steven82 - 12.05.2010, 04:27
Re: Mysql login + PVars system - by kLx - 12.05.2010, 04:32
Re: Mysql login + PVars system - by theRealG - 12.05.2010, 04:48
Re: Mysql login + PVars system - by kLx - 12.05.2010, 11:30

Forum Jump:


Users browsing this thread: 1 Guest(s)