AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   read all entrys from nvault (https://forums.alliedmods.net/showthread.php?t=173345)

Max! 12-04-2011 04:12

read all entrys from nvault
 
im using nvault as a way to store a bunch of data about the going-ons in the server so i can insert all the information into a database at the end of the map in 1 query, to maximize efficiency. This requires that I read (and then delete) all entry's in the vault at the end of tha map, but Ive never used nvault before so im having trouble with this. Ive looked at the nvault_util as well, but that forwards the information to a function every time which would mean I couldn't format all of the information easily into 1 sql query. essentially I would like something that does this:
Code:

format(query, 1024, "INSERT INTO stats col1,col2 VALUES ");
while(theresmoreentries)
{
  getinfofromvaultandsplitit_into_value1andvalue2(iVault);
  format(query, 1024, "%s('col1value', 'col2value') ", query, value1, value2);
}

executetheformattedqueryouthere

sorry for all the bad pseudo code ;)


All times are GMT -4. The time now is 08:24.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.