MySQL loading data with loops?
#2

Yes.

Swap that
pawn Код:
t < 5; i++
for
pawn Код:
t < cache_num_rows(); i++)
. Then the row number (first parameter) becomes i, instead of 0, 1, 2, 3 etc.

This is how i used to load a few hundred vehicles anyway, possibly someone has a better way of doing it.

pawn Код:
if(cache_num_rows() > 0)
    {
        for(new i=0; t < cache_num_rows(); i++)
        {  
            cache_get_value_int(i,      "Object%d",         Player[playerid][Object][%d])

        }
    }
Reply


Messages In This Thread
MySQL loading data with loops? - by CMH - 25.01.2018, 19:05
Re: MySQL loading data with loops? - by DobbysGamertag - 25.01.2018, 19:17
Re: MySQL loading data with loops? - by CMH - 25.01.2018, 19:31
Re: MySQL loading data with loops? - by CMH - 25.01.2018, 20:03
Re: MySQL loading data with loops? - by Fratello - 25.01.2018, 20:09

Forum Jump:


Users browsing this thread: 1 Guest(s)