Join Discord
Powered by
sorry, I'm a bit of an idiot. but just to confirm,...
# javascript
m
Mike92988
10/26/2021, 9:41 PM
sorry, I'm a bit of an idiot. but just to confirm, pagesize would be the total amount of result that you want on one page, correct?
g
garyaustin
10/26/2021, 9:46 PM
Yes. range takes a record number start and end from the data base query result. So if you want 15 records per page pagesize = 15.
m
Mike92988
10/26/2021, 9:48 PM
okay perfect, is there any way i can get this to work if i wanted the first page=1 instead of 0?
Mike92988
10/26/2021, 9:48 PM
not really, right?
g
garyaustin
10/26/2021, 9:48 PM
Simply sub 1 from the page number you show.
garyaustin
10/26/2021, 9:49 PM
My display has 1,2,3,4 but the actual page I send to my routine is 0,1,2,3 for the formula above to work.
garyaustin
10/26/2021, 9:51 PM
The end result is you want .range(0,14) for first page of 15 and .range(15,29) for second, etc.
m
Mike92988
10/27/2021, 8:57 PM
okay, perfect thank you very much!
Previous
Next