prepare('SELECT postID FROM blog_posts_seo WHERE postDate >= :from AND postDate <= :to'); $stmt->execute(array( ':from' => $from, ':to' => $to )); //pass number of records to $pages->set_total($stmt->rowCount()); $stmt = $db->prepare('SELECT postID, postTitle, postSlug, postAuthor, postDesc, postDate FROM blog_posts_seo WHERE postDate >= :from AND postDate <= :to ORDER BY postID DESC '.$pages->get_limit()); $stmt->execute(array( ':from' => $from, ':to' => $to )); echo '
Archives : '.$month.'-'.$year.'
'; while($row = $stmt->fetch()){ echo ''; } echo '
'; echo $pages->page_links("a-$month-$year&"); } catch(PDOException $e) { echo $e->getMessage(); } ?>