25.06.2012, 17:24
Hello.
You need to format your query BEFORE you use it in mysql_function_query. Right now, your query is doing this:
Username=%s
Money=%d
Score=%d
IP=%s
TOS=%s
You need to format your string before this point like this:
And then you can run the query:
You need to format your query BEFORE you use it in mysql_function_query. Right now, your query is doing this:
Username=%s
Money=%d
Score=%d
IP=%s
TOS=%s
You need to format your string before this point like this:
pawn Код:
new query[256];
mysql_format(connectionHandle,query,"INSERT INTO memmbers (Username, Money, Score, IP, TOS) VALUES ('%s','%d','%d','%s','%s')",pname,GetPlayerMoney(playerid), GetPlayerScore(playerid), IP,TStr);
//Where connectionHandleis the ID of your connection to the mysql database
pawn Код:
mysql_function_query(connectionHandle,query,false,"OnQueryFinish","siiss",pname,GetPlayerMoney(playerid), GetPlayerScore(playerid), IP,TStr);