04.07.2015, 17:23
I decided for mysql_tquery but I don't know then how to count rows from cache. Before mysql_tquery I use mysql_query and for counting cache_get_row_count but now I don't see any way how count rows with mysql_tquery and without calling a public. Eg.
I hope you understand me. Forget for true(3th params in mysql_tquery). I just changed on mysql_tquery from mysql_query
Code:
stock _HRP_PreviewAccountCheck(_name[])
{
new dbQUERY[86];
new Cache:_Result;
mysql_format(_HRP_server_database, dbQUERY, 86, "SELECT ID FROM "_USER_DB" WHERE Ime = '%e' LIMIT 0, 1", _name);
_Result = mysql_tquery(_HRP_server_database, dbQUERY, true);
if(cache_get_row_count()) // UKOLIKO POSTOJI RAČUN
{
cache_delete(_Result);
return (true);
}
cache_delete(_Result);
return (false);
}

