I'm using the extended version of this vault include.
What would be the best way to find out whether a specific 2nd key value already exists.
To clerify:
sqlv_set_num_ex(g_Handler, szName , "online", iData)
sqlv_set_num_ex(g_Handler, szName , "id", iSomeID)
How can I determine if iSomeID already exists somewhere in the vault as the second key ("id"), no matter what the first key is (in this case szName) ?
I hope it's possible without irritating through the whole vault.
edit: I think I found a solution by looking at the example plugin.
Code:
new Output[3][SQLVaultEntryEx] // I actually only need to know if there is at least one entry matching the query (below)
new iTotalEntries = sqlv_read_set_ex(g_Handler, Output, sizeof(Output), 0, "`id /* second key */` = iSomeID", "`id` DESC" /* DESC doesn't really matter */)
Would iTotalEntries contain the count of found entries ? Does it work like that ?