A simple MySQL help
#1

hello, i have a /setlevel id level command but i need the dini to mysql code
This is the function of saving level in dini

pawn Код:
dUserSetINT(PlayerName2(player1)).("level",(level));
                PlayerInfo[player1][Level] = level;
I just wanted to convert that to mysql.Please help me.
Reply
#2

I suggest you read up on MySQL. It's run in queries, not just one file function.
Reply
#3

Код:
new query[128];
format(query,sizeof(query),"UPDATE `tablename` SET level='%d' WHERE username='%s'",PlayerInfo[player1][Level],PlayerName2(player1));
mysql_query(query);
Edit the 'tablename' to the name of your table. and also you need to have the level and username collum inside that table else it won't work.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)