MySQL Forums
Forum List  »  Newbie

Re: MySQL pagination
Posted by: Peter Brawley
Date: September 01, 2017 09:57AM

> I set productId to 500, and offset to 500

I guess you mean @productid and @offset, which if serialisation is correct will give 500 values starting at 1001...
drop table if exists ints;
create table ints(i smallint);
insert into ints values 
 (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16);
select i from ints where i>5 limit 5 offset 5;
+------+
| i    |
+------+
|   11 |
|   12 |
|   13 |
|   14 |
|   15 |
+------+
Clear?

Options: ReplyQuote


Subject
Written By
Posted
September 01, 2017 12:29AM
Re: MySQL pagination
September 01, 2017 09:57AM
September 02, 2017 11:14AM
September 02, 2017 12:16PM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.