07.08.2018, 14:13
Quote:
|
Do I run this query within the stats command? Then how do I pull the result into the string? That's what I'm asking. Thanks for any pointers.
|
Look at this for an example (different purpose but everything you need to know is in there). It uses a threaded query, which means the query will be executed seperately and the result returned when it is done.
You execute the query using mysql_tquery and specify a callback.
When the callback is called, the result will be in the cache and you can use the cache_* functions.
The result will be one row (if you only select one player) and one column, except you also get other data.
Column 0 will be the date in this case.
Код:
new date[20]; cache_get_value_index(0, 0, date, sizeof(date)); // row 0, column 0
You can also do this instantly without a threaded query by using mysql_query, which returns a cache ID from which you can get the data exactly like a threaded query (same cache functions).


