MySQL SELECT Not getting last row
#1

This my code for command to show online/offline members
PHP код:
format(string256"SELECT Name FROM Users WHERE Clan = %d"GetPlayerClan(playeridg_SQL));
    
mysql_query(g_SQLstring);
    for(new 
i=0i<GetMaxMembers(GetPlayerClan(playeridg_SQL), g_SQL); i++)
    {
        new 
name[25], s[48];
        
cache_get_field_content(i"Name"name);
        if(
IsPlayerConnected(GetPlayerId(name)))
        {
            switch(
i)
            {
                case 
0..14:
                {
                    
format(s24+24"%s\t%s\t{00FF2F}Online\n"nameGetRankName(GetPlayerClan(playeridg_SQL), GetPlayerRank(GetPlayerId(name), g_SQL), g_SQL));
                    
strcat(memberss);
                }
                case 
15..28:
                {
                    
format(s24+24"%s\t%s\t{00FF2F}Online\n"nameGetRankName(GetPlayerClan(playeridg_SQL), GetPlayerRank(GetPlayerId(name), g_SQL), g_SQL));
                    
strcat(members2s);
                }
            }
        }
        else switch(
i)
        {
            case 
0..14:
            {
                
format(s24+24"%s\t%s\t{FF0000}Offline\n"nameGetRankName(GetPlayerClan(playeridg_SQL), GetOfflineRank(nameg_SQL), g_SQL));
                
strcat(memberss);
            }
            case 
15..28:
            {
                
format(s24+24"%s\t%s\t{FF0000}Offline\n"nameGetRankName(GetPlayerClan(playeridg_SQL), GetOfflineRank(nameg_SQL), g_SQL));
                
strcat(members2s);
            }
        }
    }
    
ShowPlayerDialog(playerid13DIALOG_STYLE_TABLIST"Clan Members"members"Next""Cancel"); 
members2 is for The second dialog "Next", Everything is fine but it doesn't show the last member, example members are 17, it shows 14 in first page and 2 in second page, 1 missing

Any help would be appreciated, thanks!
Reply


Messages In This Thread
MySQL SELECT Not getting last row - by Shinja - 31.07.2016, 16:30
Re: MySQL SELECT Not getting last row - by Konstantinos - 31.07.2016, 17:17
Re: MySQL SELECT Not getting last row - by Shinja - 31.07.2016, 19:57
Re: MySQL SELECT Not getting last row - by Konstantinos - 31.07.2016, 20:12
Re: MySQL SELECT Not getting last row - by Shinja - 31.07.2016, 20:20
Re: MySQL SELECT Not getting last row - by Konstantinos - 31.07.2016, 20:51

Forum Jump:


Users browsing this thread: 1 Guest(s)