29.10.2016, 15:38
cache_get_result_count is used for multi-statements. You don't really need it unless all the queries you sent are equivalent and you call the same exact cache functions with the same parameters (same number of columns etc).
pawn Код:
mysql_tquery(MYSQL_DEFAULT_HANDLE, "SELECT 'query 1'; SELECT 'query 2'; SELECT 'query 3';", "OnSomethingLoad", "");
forward OnSomethingLoad();
public OnSomethingLoad()
{
new tmp[8], results;
cache_get_result_count(results);
for (new i; i != results; i++)
{
cache_set_result(i);
cache_get_value(0, 0, tmp);
print(tmp);
}
}