$db = new Connection(); $allEntries = $db->pdo-> prepare('SELECT p.*, u.user_login FROM bb_offers AS p, bb_users AS u ORDER BY p.id DESC LIMIT :limit OFFSET :offset'); $allEntries-> bindParam(':limit', $limit, PDO::PARAM_INT); $allEntries-> bindParam(':offset', $offset, PDO::PARAM_INT); $allEntries-> execute();
Zapytanie ma uwzględniać paginacje. Dane są pobierane ale... w bazie mam 2 rekordy, a pobierane są 4... co jest nie tak z tym zapytaniem?