01.02.2019, 09:06
PHP код:
stock save(playerid)
{
new Iterator: test_iter<20>;
new tmp_uid, nick[30];
mysql_query(MyDB, "SELECT uid, Nick FROM players WHERE PD = 1");
new j = cache_num_rows();
for(new nr = 0; nr < j; nr++)
{
cache_get_value_int(nr, "uid", tmp_uid);
cache_get_value(nr, "Nick", nick, 30);
printf("From sql: %d",tmp_uid);
Iter_Add(test_iter, tmp_uid);
}
foreach(new load : test_iter)
{
printf("From iter: %d", load);
}
}
From sql: 1,2,3,4
From iter: 1
Why iter save only first number?