26.07.2016, 16:51
Hi, i'm making my gamemode to work with sqlite and i want to make it work as fast as possible, so i have a question:
їWhich method will get the query faster? Or it's the same?
1st way:
2nd way:
NOTE: IDD is the ID retrieved from player data at a sqlite table.
Nick stock:
So, which method will work faster? Thanks!
їWhich method will get the query faster? Or it's the same?
1st way:
Код:
format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `username` = '%s' LIMIT 1", Nick(playerid)); Result = db_query(Database, Query);
NOTE: IDD is the ID retrieved from player data at a sqlite table.
Код:
format(Query, sizeof(Query), "SELECT * FROM `users` WHERE `ID` = '%d' LIMIT 1", PlayerInfo[playerid][IID]); Result = db_query(Database, Query);
Код:
stock Nick(playerid) { new nname[MAX_PLAYER_NAME]; GetPlayerName(playerid, nname, sizeof(nname)); return nname; }