No active cache
#1

Hello.


I send a query and then loop through all the rows:
pawn Code:
for(new i; i < cache_get_row_count(); i++)
                            {  
                                new name[MAX_PLAYER_NAME];
                                cache_get_row(i,1,name);
                                format(query,sizeof(query),"%s\t%d min љią savaitę\n",query,GetPlayerXpThisWeek(cache_get_row_int(i,0)));
                            }
But the function "GetPlayerXpThisWeek" sends a query of its' own(non threaded aswell).
pawn Code:
stock GetPlayerXpThisWeek(sqlid)
{
    new query[70],int;
    format(query,sizeof(query),"SELECT SecondsThisWeek FROM job_experience WHERE UserId = %d",sqlid);
    new Cache:r = mysql_query(DbHandle,query);
    if(cache_get_row_count()) int = cache_get_row_int(0,0);
    cache_delete(r);
    return int;
}
So the loop only runs once (I printed out, there are more rows).. also this warning appears
pawn Code:
[21:24:24] [WARNING] cache_get_row_count - no active cache
Reply


Messages In This Thread
No active cache - by dusk - 06.12.2013, 18:21
Re: No active cache - by Richie© - 06.12.2013, 18:24
Re: No active cache - by dusk - 06.12.2013, 18:32
Re: No active cache - by Richie© - 06.12.2013, 18:33
Re: No active cache - by dusk - 06.12.2013, 18:37
Re: No active cache - by Patrick - 06.12.2013, 18:42
Re: No active cache - by dusk - 06.12.2013, 18:53
Re: No active cache - by dusk - 06.12.2013, 20:38
Re: No active cache - by Vince - 06.12.2013, 20:53
Re: No active cache - by dusk - 06.12.2013, 21:01

Forum Jump:


Users browsing this thread: 1 Guest(s)