Posts: 61
Threads: 1
Joined: Jan 2013
Reputation:
0
Interesting technique. I greatly appreciate it. Whatever it is. Congratulations on your efforts.
Note - MySQL is the best of the best and convenient to use.
#March
Posts: 148
Threads: 31
Joined: Jun 2011
Reputation:
0
How exactly are you supposed to save stats?
I assume it's something to do with this
UPDATE `USERS` SET (etc. etc. etc.)
However, I am not 100% sure how. Right now I am using INI and I hate it, Causes so many issues. I used MySQL in the past however, I found myself without a Database now, and am trying alternative means. This so far has worked out, up until the saving the stats part that is.
Can you provide a small example of how to do so based on your works you have so far?
Posts: 320
Threads: 16
Joined: Feb 2012
Quote:
Originally Posted by [TC]XxJuggaloxX
How exactly are you supposed to save stats?
I assume it's something to do with this
UPDATE `USERS` SET (etc. etc. etc.)
However, I am not 100% sure how. Right now I am using INI and I hate it, Causes so many issues. I used MySQL in the past however, I found myself without a Database now, and am trying alternative means. This so far has worked out, up until the saving the stats part that is.
Can you provide a small example of how to do so based on your works you have so far?
|
For example, you're trying to save the players admin level, you will go like this.
pawn Code:
format(string, sizeof(string), "UPDATE `USERS` SET `ADMINLEVEL`='%i' WHERE `NAME`='%s'", PlayerInfo[playerid][pAdminLevel], DB_Escape(GetPlayerNameEx(playerid)));
db_free_result(db_query(UserDatabase, string));
Posts: 1,905
Threads: 63
Joined: Oct 2011
Reputation:
0
db_free_result is redundant you know....since UPDATE doesn't return any data.
Posts: 320
Threads: 16
Joined: Feb 2012
Quote:
Originally Posted by VincentDunn
db_free_result is redundant you know....since UPDATE doesn't return any data.
|
I just copied it from my LVRP Script since he wanted a piece of code that I'm currently using