Mysql pagination without offset
Here's one way:

mysql&gt; #select all in reverse
mysql&gt; select id, createdAt from post order by createdAt desc, id desc;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   16 | 2014-11-16 09:11:18 |
|   15 | 2014-11-16 09:11:03 |
|   14 | 2014-11-16 09:10:32 |
|   13 | 2014-11-16 09:10:05 |
|   12 | 2014-11-16 09:09:47 |
|   11 | 2014-11-13 18:35:01 |
|   10 | 2014-11-13 18:33:08 |
|    9 | 2014-11-13 18:33:01 |
|    8 | 2014-11-13 17:51:21 |
|    7 | 2014-11-13 17:40:30 |
|    6 | 2014-11-12 18:37:44 |
|    5 | 2014-11-12 18:21:44 |
|    4 | 2014-11-12 18:17:30 |
|    3 | 2014-11-12 17:31:31 |
|    2 | 2014-11-11 18:37:40 |
|    1 | 2014-11-11 17:28:41 |
+------+---------------------+
16 rows in set (0.01 sec)

mysql&gt; #select last two
mysql&gt; select id, createdAt from post order by createdAt desc, id desc limit 2;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   16 | 2014-11-16 09:11:18 |
|   15 | 2014-11-16 09:11:03 |
+------+---------------------+
2 rows in set (0.00 sec)

mysql&gt; #select next button
mysql&gt; SELECT id, createdAt FROM post  WHERE createdAt &lt;= '2014-11-16 09:11:03' AND (id &lt; '15' OR createdAt &lt; '2014-11-16 09:11:03') ORDER BY createdAt DESC, id DESC LIMIT 2;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   14 | 2014-11-16 09:10:32 |
|   13 | 2014-11-16 09:10:05 |
+------+---------------------+
2 rows in set (0.00 sec)

mysql&gt; #select next button again
mysql&gt; SELECT id, createdAt FROM post  WHERE createdAt &lt;= '2014-11-16 09:10:05' AND (id &lt; '13' OR createdAt &lt; '2014-11-16 09:10:05') ORDER BY createdAt DESC, id DESC LIMIT 2;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   12 | 2014-11-16 09:09:47 |
|   11 | 2014-11-13 18:35:01 |
+------+---------------------+
2 rows in set (0.00 sec)

mysql&gt; #undo next button (just to get back conceptually)
mysql&gt; SELECT id, createdAt FROM post  WHERE createdAt &lt;= '2014-11-16 09:11:03' AND (id &lt; '15' OR createdAt &lt; '2014-11-16 09:11:03') ORDER BY createdAt DESC, id DESC LIMIT 2;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   14 | 2014-11-16 09:10:32 |
|   13 | 2014-11-16 09:10:05 |
+------+---------------------+
2 rows in set (0.00 sec)

mysql&gt; #we already saw 'next' from here
mysql&gt; #now let's click the previous button
mysql&gt; #change the direction of the inequalities and order by statement
mysql&gt; SELECT id, createdAt FROM post  WHERE createdAt &gt;= '2014-11-16 09:10:32' AND (id &gt; 14 OR createdAt &gt; '2014-11-16 09:10:32') ORDER BY createdAt asc, id asc LIMIT 2;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   15 | 2014-11-16 09:11:03 |
|   16 | 2014-11-16 09:11:18 |
+------+---------------------+
2 rows in set (0.00 sec)

mysql&gt; #and if you want them sorted in desc:
mysql&gt; select id, createdAt from (SELECT id, createdAt FROM post  WHERE createdAt &gt;= '2014-11-16 09:10:32' AND (id &gt; 14 OR createdAt &gt; '2014-11-16 09:10:32') ORDER BY createdAt asc, id asc LIMIT 2 ) a order by createdAt desc, id desc;
+------+---------------------+
| id   | createdAt           |
+------+---------------------+
|   16 | 2014-11-16 09:11:18 |
|   15 | 2014-11-16 09:11:03 |
+------+---------------------+
2 rows in set (0.00 sec)