[MySQL] tquery issue
#3

Quote:
Originally Posted by Jefff
View Post
because you are getting all time row id 0 in cache_get_field
thanks worked, but now I have 1 more problem

PHP Code:
forward tLoadClans();
public 
tLoadClans()
{
    new 
rowsfieldsstr[128];
    
cache_get_data(rowsfields);
    if(
rows)
    {
        for(new 
0rowsi++)
        {
                
ClanDB[i][ClanID] = cache_get_field_content_int(i"clanid");
                
cache_get_field_content(i"clan_name"ClanDB[i][ClanName]);
                
ClanDB[i][ClanLevel] = cache_get_field_content_int(i"clan_level");
                
ClanDB[i][ClanEXP] = cache_get_field_content_int(i"clan_exp");
                
ClanDB[i][ClanMaxEXP] = cache_get_field_content_int(i"clan_max_exp");
                
ClanDB[i][ClanColor] = cache_get_field_content_int(i"clan_color");
                
format(strsizeof(str), "[%d] clanid: %d, exp: %d, max exp: %d",iClanDB[i][ClanID], ClanDB[i][ClanEXP], ClanDB[i][ClanMaxEXP]);
                
printf(str);
        }
    }

PHP Code:
[0clanid1exp0max exp0
[1clanid7exp 0max exp300 
the problem is that [0] = clanid 1 and [1] = clanid 7
I want the 'i' to be the clanid
Reply


Messages In This Thread
[MySQL] tquery issue - by Lirbo - 22.07.2017, 15:14
Re: [MySQL] tquery issue - by Jefff - 22.07.2017, 15:18
Re: [MySQL] tquery issue - by Lirbo - 22.07.2017, 16:10
Re: [MySQL] tquery issue - by Kaperstone - 22.07.2017, 16:29
Re: [MySQL] tquery issue - by Lirbo - 22.07.2017, 16:56
Re: [MySQL] tquery issue - by skuller12 - 22.07.2017, 17:10
Re: [MySQL] tquery issue - by Kaperstone - 22.07.2017, 17:20
Re: [MySQL] tquery issue - by Lirbo - 22.07.2017, 19:20

Forum Jump:


Users browsing this thread: 3 Guest(s)