[GameMode] Basic SQLite
#21

SQLite is the fatest, but MySQL is best

Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 85 seconds.

-.-"
Reply
#22

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
Reply
#23

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?
Reply
#24

Quote:
Originally Posted by [TC]XxJuggaloxX
View Post
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));
Reply
#25

db_free_result is redundant you know....since UPDATE doesn't return any data.
Reply
#26

Quote:
Originally Posted by VincentDunn
View Post
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
Reply
#27

Quote:
Originally Posted by ViruZz
View Post
I just copied it from my LVRP Script since he wanted a piece of code that I'm currently using
Still doesn't justify you freeing an empty result set. It's like trying to empty a bucket that's already empty.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)