25.03.2016, 17:49
Quote:
What i meant was sort of similar to this logic.
Example: Code:
SavePVar(playerid, "Test"); // The execute interval has started // New variables added (query isn't executed) SavePVar(playerid, "Test2"); SavePVar(playerid, "Test3"); SavePVar(playerid, "Test4"); // After 'X' seconds (say 2 secs), the query is executed and result is free! |
Giving the users the ability to run transactions would solve this.
Code:
//Single Query SavePVar(playerid, "Test0"); //Multiple Queries StartPVarQuery(); // Macro for db_query("BEGIN") SavePVar(playerid, "Test"); SavePVar(playerid, "Test2"); SavePVar(playerid, "Test3"); SavePVar(playerid, "Test4"); EndPVarQuery(); // Macro for db_query("COMMIT")