04.08.2018, 20:53
Check that: https://sampwiki.blast.hk/wiki/MySQL/R40
PHP Code:
Plant_GetOwner(sqlid)
{
new
query[128],
Cache:query_cache;
format(query, sizeof(query), "SELECT `Character` FROM `characters` WHERE `ID` = '%d'", ReturnName(sqlid));
query_cache = mysql_query(g_iHandle, query, "OnQueryFinished", "dd", sqlid, THREAD_FIND_USERNAME);
if(cache_num_rows())
cache_get_value_index(0, 0, query);
else
strcpy(query, "N/A");
cache_delete(query_cache);
return query;
}