problem command /BanList
#2

MySQL provides LIMIT clause. Have a variable that holds the total number of bans. Then you can use offset and items per page.

pawn Код:
SELECT ... LIMIT 20, 10
it will select 10 items starting from rowid 20. So basically you have a variable that stores page.
pawn Код:
..., "SELECT ... LIMIT %d,%d", page * ITEMS_PER_PAGE, ITEMS_PER_PAGE);
to determinate if there is "Next Page":
pawn Код:
if (page * ITEMS_PER_PAGE > total_bans)
{
    strcat(dialog_string_here, "Next Page");
}
Reply


Messages In This Thread
problem command /BanList - by rollercaster - 17.07.2018, 16:56
Re: problem command /BanList - by Calisthenics - 17.07.2018, 17:48
Re: problem command /BanList - by rollercaster - 17.07.2018, 18:04
Re: problem command /BanList - by Calisthenics - 17.07.2018, 21:57
Re: problem command /BanList - by rollercaster - 18.07.2018, 05:02
Re: problem command /BanList - by Calisthenics - 18.07.2018, 08:20
Re: problem command /BanList - by rollercaster - 18.07.2018, 15:11
Re: problem command /BanList - by Calisthenics - 18.07.2018, 16:34
Re: problem command /BanList - by rollercaster - 18.07.2018, 18:33
Re: problem command /BanList - by rollercaster - 19.07.2018, 12:10

Forum Jump:


Users browsing this thread: 1 Guest(s)