17.02.2014, 18:17
Quote:
@kvann:
You are sending another query in your custom function "NumberKontakt", which overwrites the active cache. You have to re-set the cache as active. |
Edit: Found cache_set_active, thanks.
Edit2: When i'm using a function like this, do I have to free the result/delete the cache?
pawn Code:
stock bool:CheckForUser(sqlid)
{
new bool:olemas;
if (sqlid > 0)
{
new string[128];
mysql_format(db, string, sizeof(string), "SELECT * FROM kasutajad WHERE id = %i", sqlid);
mysql_query(db, string);
if (mysql_num_rows()) olemas = true;
}
return olemas;
}