<?php
$pdo = new PDO('mysql:host=localhost;dbname=gotlib;charset=utf8', 'root', '', null);
$stmt = $pdo->query('SELECT * FROM blog_posts ORDER BY id DESC LIMIT 5 OFFSET 5');
var_dump($stmt->fetchAll());
<?php
$pdo = new PDO('mysql:host=localhost;dbname=gotlib;charset=utf8', 'root', '', null);
$stmt = $pdo->prepare('SELECT * FROM blog_posts ORDER BY id DESC LIMIT 5 OFFSET :offset');
$stmt->execute(['offset' => 5]);
var_dump($stmt->fetchAll());