You may use the MySQL LIMIT function.
First of all, you must know how many posts you will retrieve:
SELECT Count(*) FROM table WHERE condition
You may do this to know what page are you in.
if (!isset($pagenumber)){$pagenumber=1)
Now, let's see what are the amount of results and the starting position
$amount = 15 // or any other number
$startposition = $pagenumber * $amount - $amount
Then, you will use LIMIT to present results by pages.
SELECT fields FROM table WHERE condition LIMIT $startposition,$amount
It is important to know that the first record is always 0.
To go next: $startposition + 1
To go previous: $startposition - 1
To have the number of pages: ceil($rows/$amount) // where $rows is the total number of records